Page 2 of 2
Re: rreHardCopy - print the contents of a fld
Posted: Tue Jun 09, 2015 1:18 am
by quailcreek
Hi Jacqueline,
This is an iSO app. hence all the printing. I can upload the stack if you want to take a look.
Re: rreHardCopy - print the contents of a fld
Posted: Tue Jun 09, 2015 9:22 am
by jacque
Now that you have the printing stack figured out for iOS, move back to the Mac to test the actual printouts. Once they work, go back to IOS for final testing. It's way easier that way.
Re: rreHardCopy - print the contents of a fld
Posted: Tue Jun 09, 2015 4:43 pm
by quailcreek
Doh! I've been so wrapped around the axle about this app being iOS I didn't think about doing that. Thanks again J,
Re: rreHardCopy - print the contents of a fld
Posted: Tue Jun 09, 2015 7:44 pm
by quailcreek
I filed a bug report on the print margin issue. No matter what I set the right and bottom margins to it has no affect on the output in the PDF.
Re: rreHardCopy - print the contents of a fld
Posted: Tue Jun 09, 2015 7:49 pm
by jacque
quailcreek wrote:Doh! I've been so wrapped around the axle about this app being iOS I didn't think about doing that. Thanks again J,
Yeah, brain freeze. Been there. At least you'll never get caught up like that again. Next time it will be something else.

Re: rreHardCopy - print the contents of a fld
Posted: Wed Jun 10, 2015 9:31 pm
by quailcreek
So here's what I ended up with. The reason for setting the height of the fld is because there are text lines in the fld which can be more than one sentence long but would still be counted as "a line". That's why using the num of lines or something like it won't work right. Also, the bug report regarding setting the printMargins when using print to pdf having no affect, came back as "not a bug'. What I needed to do was set the size of the printFld to 2x27 smaller instead of just 27 smaller on the right and bottom. I also had to tweak the printFld bottom a few pixels shorter to accommodate the textSize and fixed line height setting. This was to eliminate any partial lines at the bottom of the pages. This took me quite awhile to work through so I wanted to share what I came up with to help spare others the heartburn. Thanks again to Jacqueline for her help.
Code: Select all
open printing to pdf tPDFFile
if there is a stack tPrintPath then
put the pageHeights of fld "PrintFld" of cd 1 of stack tPrintPath into tFldHeight
set the vScroll of fld "PrintFld" of cd 1 of stack tPrintPath to 0
put the num of lines of tFldHeight into tPageCount
put zero into tTotalScroll
repeat with xLines = 1 to tPageCount
add line xlines of tFldHeight to tTotalScroll
end repeat
repeat with nLines = 1 to tPageCount
if nLines is 1 then
print cd 1 of stack tPrintPath
else
if nLines = tPageCount then ## The last page to print
set the Height of fld "PrintFld" of cd 1 of stack tPrintPath to (line nLines of tFldHeight)
set the vScroll of fld "printFld" of cd 1 of stack tPrintPath to tTotalScroll
print cd 1 of stack tPrintPath
else
put the vScroll of fld "printFld" of cd 1 of stack tPrintPath into tCurrentScroll
set the vScroll of fld "printFld" of cd 1 of stack tPrintPath to (tCurrentScroll + line nLines of tFldHeight)
print cd 1 of stack tPrintPath
end if
end if
end repeat
else
answer the result
end if
close printing