PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Setting viewer font size on first page  (Read 278 times)

Jeff Wilder

  • Silver Member
  • ***
  • Posts: 25
    • View Profile
Setting viewer font size on first page
« on: December 19, 2019, 02:50:02 PM »
Hello All,
I am experiencing an odd behavior from the *Viewer*, but perhaps I am doing something wrong.

When my report output falls within certain widths, the font displayed on the first page is smaller than the rest of the report pages.  I have created a small example program to demonstrate the behavior.  When you enter 99 for the maximum column size, the pages are identical. However, when you enter 100 for the maximum column size, the first page displays with a smaller font size as shown in the attached image.

Is this expected behavior for the viewer or am I missing something? I do not see the same results when printing to *PDF* or *WINPRT*. I am using PxPlus 2019 and 2018. Any ideas what may be going on here?

Thanks,
Jeff

Code: [Select]
0010 begin
0020 let c=100
0030 input edit "Maximum Columns: ",c
0040 for c; let x$+=mid(str(c),-1); next
0050 open (1)"*viewer*;onclose;margins=500:500:500:500;Columns="+str(c)
0060 gosub PrintTest
0070 close (1)
0080 open (1)"*PDF*;margins=500:500:500:500;view"
0090 gosub PrintTest
0100 close (1)
0110 end

0120 PrintTest:
0130 print (1)'font'("Arial",-12),'DF',
0140 print (1)'font'("Arial",mxc(prn)/c),'DF',
0150 print (1)'text'(@x(0),@y(1),@x(c),@y(2.5),x$),
0160 print (1)'text'(@x(0),@y(4),@x(40),@y(5.5),"Page 1"),
0170 print (1)'FF',
0180 print (1)'text'(@x(0),@y(1),@x(c),@y(2.5),x$),
0190 print (1)'text'(@x(0),@y(4),@x(40),@y(5.5),"Page 2"),
0200 return