Printing Text Longer than One Page
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Printing Text Longer than One Page
Hi All
I hope that everyone is well.
I am starting my first attempt at printing reports to PDF.
I can get a one page report to print to PDF and save to desktop.
If the text requiring printing is longer than 1 page long Is it possible to print the text as multiple pages?
The method I am currently using prints the text that fits onto page 1 and then cuts off the rest.
Many Thanks
Hadleigh
I hope that everyone is well.
I am starting my first attempt at printing reports to PDF.
I can get a one page report to print to PDF and save to desktop.
If the text requiring printing is longer than 1 page long Is it possible to print the text as multiple pages?
The method I am currently using prints the text that fits onto page 1 and then cuts off the rest.
Many Thanks
Hadleigh
Re: Printing Text Longer than One Page
Hi Hadleigh,
please look up "revprintfield" in the dictionary, maybe that is what you are looking for.
Best
Klaus
please look up "revprintfield" in the dictionary, maybe that is what you are looking for.
Best
Klaus
Re: Printing Text Longer than One Page
Excellent, thank you very much Klaus
I have just carried out a small trial and it looks like revprintfield will likely be the answer to the issue after some practice.
Many Thanks
I have just carried out a small trial and it looks like revprintfield will likely be the answer to the issue after some practice.
Many Thanks
Re: Printing Text Longer than One Page
Hi.
I will check my code tomorrow at my office, since it has been a long time since I saw the snippet that does it, but I print multiple pages "to PDF" all the time. I do not remember ever using "revPrintField" in my process.
Craig
I will check my code tomorrow at my office, since it has been a long time since I saw the snippet that does it, but I print multiple pages "to PDF" all the time. I do not remember ever using "revPrintField" in my process.
Craig
Re: Printing Text Longer than One Page
Lovely thanks Craig,
I look forward to seeing your method also.
Many thanks
I look forward to seeing your method also.
Many thanks
Re: Printing Text Longer than One Page
Hi.
I always find it odd how I always have to review my old code to even remember how I implemented whatever I did.
So not rocket science:
So old stuff, that is, print successive cards. This may be entirely different than your issue of printing run-away text. But on the other hand, a little pre-processing ought to give you the same essential I have, the number of pages in the final, and them maybe you can sort of do what I did.
Anyway, let us know...
Craig
I always find it odd how I always have to review my old code to even remember how I implemented whatever I did.
So not rocket science:
Code: Select all
...
open printing to pdf (filepath & ".pdf") ---SAVE DRAWING TO LOCATION WITH ".PDF" EXTENSION
repeat numPages --I know in advance the length of the nascent document. This may be a sticking point for you
-- Lots of populating cards with text, and adjusting the physical dimensions of many graphics
--The result is a series of CAD-like drawings, the best LC can do
print this card
end repeat
close printing
...
Anyway, let us know...
Craig
Re: Printing Text Longer than One Page
The pageHeights function will give you the number of pages to print.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Printing Text Longer than One Page
Thanks Jacque and Craig
Craig I understand your method but it won't quite work for my purpose as I will be printing a list of records and the number of lines of text in each record won't be the same.
I have spent all day working on a script which dynamically builds the print layout for each page and populates the text fields of each record. The script also counts the number of lines of text for each record and using the line height works out if the text can fit into the remaining space on the page, if it can't then it will fit in as many lines of the text onto the page as possible and save the remaining lines into a 'text remaining' field. A new page will then be started and the first row of the new page will be populated with the text remaining.
A work in progress, and a lot of work but it will hopefully be a template that I can work from for future similar reports.
Many Thanks
Craig I understand your method but it won't quite work for my purpose as I will be printing a list of records and the number of lines of text in each record won't be the same.
I have spent all day working on a script which dynamically builds the print layout for each page and populates the text fields of each record. The script also counts the number of lines of text for each record and using the line height works out if the text can fit into the remaining space on the page, if it can't then it will fit in as many lines of the text onto the page as possible and save the remaining lines into a 'text remaining' field. A new page will then be started and the first row of the new page will be populated with the text remaining.
A work in progress, and a lot of work but it will hopefully be a template that I can work from for future similar reports.
Many Thanks