|Save as PDF macro
|Page 1 of 1|
|Author:||Emma [ 2017-03-28 12:48:49 ]|
|Post subject:||Save as PDF macro|
I am trying to write a macro to export the active document to pdf. Nothing fancy, just the equivalent of the Menu command File:Export as PDF... I just want it to export the pdf file in the same folder where the rtf file is, and with the same name (and pdf extension of course).
Whatever I do, my simple macro creates the pdf file in the place of the original rtf file. That is, the rtf file gets replaced by the pdf, while keeping the same rtf extension. When in fact I expect the command Save as PDF to create the pdf as another file next to the rtf file that gets converted.
I am doing things like :
$doc = Document.active
$outputDir=$doc.filePath.filePathByRemovingLastComponent & '/'
Save as PDF $outputDir
and variations on the above, all without success.
Can somebody help ?
|Author:||Kino [ 2017-04-05 08:56:06 ]|
|Post subject:||Re: Save as PDF macro|
As Save As PDF command is not clever enough, you have to give it a full path of the pdf to be generated. Something like this would work.
|Page 1 of 1||All times are UTC - 8 hours|
|Powered by phpBB® Forum Software © phpBB Group