PDF FontSize and Option 68
Moderators: Susan Smith, admin, Gabriel
PDF FontSize and Option 68
In my PDF creation I found my fontsizes were not being respected horizontally only vertically and found that option 68 should fix that for me, however when I use Option 68 my fontsizes are ignored completely. Am I missing something? Has anyone else had this issue?
John Bowman
Re: PDF FontSize and Option 68
You might be having a problem with Proportional Spacing .. When using NWP you have to set PS to off if you want to print any non-proportional fonts. Font Size will be affected if your PS setting is wrong.
Specify [PS] or [/PS] to turn it on or off if you're using printer.sys substitutions. And remember, if you're not using printer.sys you can always just look up the command in printer.sys to find out what it is, and then specify it directly in your code.
Gabriel
Specify [PS] or [/PS] to turn it on or off if you're using printer.sys substitutions. And remember, if you're not using printer.sys you can always just look up the command in printer.sys to find out what it is, and then specify it directly in your code.
Gabriel
Re: PDF FontSize and Option 68
It seems good thinking but [PDF] does not have a substitute for [PS] or [/PS] in pdf.sys like PCL does in printer.sys.
John Bowman
Re: PDF FontSize and Option 68
John,
You must be talking about the CLS printer.cls -- that is completely different then printer.sys.
The real printer.sys does not have a section for PDF at all. You don't need one.
BR's built in PDF functionality uses NWP. So let me say again, for PDF printing in BR you use PCL or NWP codes.
Gabriel
You must be talking about the CLS printer.cls -- that is completely different then printer.sys.
The real printer.sys does not have a section for PDF at all. You don't need one.
BR's built in PDF functionality uses NWP. So let me say again, for PDF printing in BR you use PCL or NWP codes.
Gabriel
Re: PDF FontSize and Option 68
Remember you're really just using NWP. You do not need to worry about PDF at all -- you just print ANY NWP report and BR handles the rest, putting it in a PDF file for you.
Re: PDF FontSize and Option 68
I tried adding the "\E(s0P" (where \E is chr$(27)) from the printer.sys line that shows:
To the top of my page, right after the page size is set but it did not affect the proportional spacing that I want to prevent.
Code: Select all
Printer PCL [/PS], "\E(s0P" ! Cancel Proportional Spacing
John Bowman
Re: PDF FontSize and Option 68
Okay - thanks to some help from Gordon - I've figured out what my problem was. For starters I was using Fixed Width Fonts and expecting Option 68 to change their spacing. Of course, it does not.
For Fixed Width Fonts you need to specify both the height and the width. Since I am converting functions that call a VB6 print routine to call BR PDF routine I needed a bit of automatic translation. Here's what I came up with (in pseudo-code):
The adjustments may not be exact, - I may end up tweaking them more later - but they are pretty close.
For Fixed Width Fonts you need to specify both the height and the width. Since I am converting functions that call a VB6 print routine to call BR PDF routine I needed a bit of automatic translation. Here's what I came up with (in pseudo-code):
Code: Select all
If it is a fixed width font then
cpi=24-fontsize
pr #255: esc$&'(s'&str$(cpi)&'H'
fontsizeHeight=fontsize/1.11
pr #255: esc$&'(s'&str$(fontsizeHeight)&'V'
else
pr #255: esc$&'(s'&str$(fontsize)&'V'
end if
John Bowman