Printing part of a card to PDF
Posted: Sat Jan 17, 2015 1:26 am
I have been tinkering with the create PDF lesson and have hit a snag. Instead of printing the entire card I want to print 3/4 of the card.
I cannot get the syntax right for specifying the are of the card I want to print to PDF and could do with a bit of help. Here is the code I am working with:
I think my setting the area to print to PDF is set here:
I have tried a couple of options which have included adding "from 0,0,575,400" usually, but the debug says I need a "to" at the end. Even though there is a "print to" command further up.
Any help would be greatly appreciated.
I cannot get the syntax right for specifying the are of the card I want to print to PDF and could do with a bit of help. Here is the code I am working with:
Code: Select all
on printInvoice
set the visible of button "btnPrint" to false
put specialFolderPath("documents") & "/Invoice009.pdf" into tPDFPath
-- Handle the default text of the myCompany field
if the text of field "myCompany" is "Your company" then
set the visible of field "myCompany" to false
else
set the visible of field "myCompany" to true
end if
open printing to pdf tPDFPath
if the result is "Cancel" then
exit printInvoice
else
print card "invoice" of this stack into 0,0,575,600
end if
close printing
set the visible of button "btnPrint" to true
end printInvoice
Code: Select all
print card "invoice" of this stack into 0,0,575,600
Any help would be greatly appreciated.