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.