Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
revPrintText (tData),,tab & "<%pageNumber%> of <%numPages%>"
However, I have problems with the right side of some text being blocked (maybe by the border?) or truncated. See the final letter 'e' in the attached image.
Why is this happening? It seems to only happen on certain fonts (e.g. Calibri, Verdana) but not others (e.g. Tahoma, Times New Roman)
I'm not printing the card, I'm using revPrintText, but anyway the dontwrap of the field that has the text is true so it shouldn't cut anything off anyway.
I am indeed on Windows. Maybe it relates to how Windows uses different fonts for printing an on-screen display. I didn't know Windows did that. How confusing. I only have one Verdana in my Windows fonts folder, so I wonder what font it uses for display vs printing.
Well, it's not creating an image and pasting that onto a PDF -- the text in the PDF can be hilited/copied/etc.
It sounds like there's a more popular way to make a PDF in LC? I believe I remember seeing that LC can create a PDF by snapshotting a card, but with varying numbers of pages for my documents, I thought that it would take me much longer to configure, so I opted for what I thought would be workable for the time being.
If I do the snapshotting option, will the resulting text still be able to be hilited/copied or will it be a pure graphic PDF?
on mouseUp
ask file "Save as:" with "Print.pdf"
put it into tFileName
if tFileName is empty then exit to top
set the printerOutput to "file:" & tFileName
revShowPrintDialog false, false
revPrintField the long name of fld "GUFF"
end mouseUp
I have a horrible feeling this will only work on a Macintosh.
Windows renders text for screen and print with different metrics. Setting the stack property formatForPrinting to will adjust the screen rendering (and probably look ugly on screen) but then when you print, it should correctly output (unless there is a different problem). After printing, you can set the stack property false again.
richmond62 wrote: Sat Jan 06, 2018 10:37 am
I don't really understand what all the fuss is about. Here is what the PDF printed from
my stack on Windows looks like:
print2PDFwindows.pngPrinty.png
No other code needed.
Can revPrintField do footers? In the dictionary there's talk of reading special expressions like <%pageNumber%>, but I don't see any syntax to set up header/footer text.
If that's the case, then I think I'll just use a different font and continue using revPrintText.