Page 2 of 2
Re: IOS Print to PDF
Posted: Thu Jan 31, 2013 7:52 am
by Nakia
Hi Jacque,
tCardsToPrint is built from below, and the 2 values are the names of the Cards.
Code: Select all
put ("Print" & return & "Print2" & return) into tCardsToPrint
I will try the empty handler and place the cards back into the main stack
Re: IOS Print to PDF
Posted: Thu Jan 31, 2013 8:00 am
by Nakia
Tried the empty handler in each print card (after putting them into the Mainstack) but still the same result.
FYI, printing loop worked again fine....
Any other suggestions?
Re: IOS Print to PDF
Posted: Thu Jan 31, 2013 8:02 pm
by jacque
You could lock messages instead, which prevents engine messages from occuring:
Code: Select all
on printPDF
lock messages
-- etc
unlock messages
end printPDF
I'm not sure why printing doesn't print all pages. The best way for you to find out is to set a debugging checkpoint and trace each line. Or add a check for "the result" after the print command, there may be an error in it.
Code: Select all
print card (line x of tCardsToPrint) of stack "Printing" into 110,50,500,700
if the result is not empty then answer the result
Re: IOS Print to PDF
Posted: Thu Jan 31, 2013 10:38 pm
by Nakia
Hi Jacque,
Tried the lock message commad on the start of the handler but no luck unfortunately.
still seeing the same thing..
I will try getting it back into a Substack and debug this print loop..
Re: IOS Print to PDF
Posted: Fri Feb 01, 2013 12:42 am
by Nakia
Okay,
So after adding the dubugging point in the print loop and seeing nothing I thought I might run it in the IDE and see what happened.
When it gets to printing the card it errors out and says:
"card or stack must be open to print it"
So i added -- openStack "Printing" to the start of the handler but it shows the stack even with the lock screen set..
Re: IOS Print to PDF
Posted: Fri Feb 01, 2013 1:38 am
by Nakia
Success
- Set Invisibility to false of the sub Stack
- open and close the stack when printing
Code: Select all
on printPDF
-- PDF Printing
put specialFolderPath("documents") & "/Inspection.pdf" into tFilePath
put ("Print" & return & "Print2" & return) into tCardsToPrint
lock screen
open stack "Printing"
open printing to pdf tFilePath
if the result is "Cancel" then exit printPDF
repeat with x = 1 to the number of lines of tCardsToPrint
print card (line x of tCardsToPrint) of stack "Printing" into 110,50,500,700
print break
end repeat
close printing
close stack "Printing"
wait 2 seconds
unlock screen
mergReader tFilePath
end printPDF
Thanks everyone for all their help!!!!