enigma2k wrote:
THANKS, deleting the text file did the trick and it is running now as it should. 🙂
The pdf output is in a strange format, however (I think it is an automatic format). As far as I understand the code you make use of the standard OSX PDF Save function, but why does it ignore the current settings for it?
Is there any way to change the PDF output to A4?
As it's what I got whith your document when I used Share > PDF, I assumed that it was your own settings so I left it as is.
After reading your question I made complementary tests.
The file which was in your mail behaves exactly the same way on my machine supposed to use A4 paper size.
The only workaround which I found is :
Create a new Numbers document starting from the blank template.
Define its format as A4, portrait
Create a document with your template
Copy the table then paste it in the newly created document.
Save the new document as a template.
Go to the My Templates folder
Rename the original template as invoice_original.nmbtemplate
and
rename the new one as invoice.nmbtemplate.
The "Save in PDF" feature available thru AppleScript is supposed to mimic the Share > PDF feature, not the File > Print > Print in a PDF one.
The solution you have come up with by dragging and dropping the csv directly into numbers, sounds intersting too. I don't understand, however, this step "Then merge in a Pages document in which you will have inserted
merge fields matching the header names defined in the "Merger" table."
How can I merge in a Pages document?
You must do you user duty and study the Merge feature in Pages User Guide whose chapter 11 is entitled :
Personalizing Documents with Address Book and Numbers Data
This chapter is 7 pages long. I will not reprint it here.
Yvan KOENIG (VALLAURIS, France) jeudi 8 septembre 2011 22:14:36
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
My iDisk is : <http://public.me.com/koenigyvan>
Please : Search for questions similar to your own before submitting them to the community