cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

possible to override the Save As location in the Compose PDF File dialog?

naglists
1-Newbie

possible to override the Save As location in the Compose PDF File dialog?

The Save As field in the Compose PDF File dialog defaults to the location of
the XML instance. Is it possible to override the path (keeping the
filename)?

I'd love to find there was an APTPDFDIR or set pdfpath or something similar
that if set would replace the functionality of trying to drop the PDF next
to the XML.

If wishes were fishes, right?

--
Paul Nagai
1 REPLY 1

Hey, Paul...

I don't know of a really simple way, like just setting an environment variable, but something like this might (translation: untested) work:

autoload compose::compose_for_pdf() comp_pdf;
function compose_for_pdf_custom(doc=current_doc())
{
local params[];
# Request interactive operation for Compose PDF
params["interactive"] = 1;
# Get target directory from APTPDFDIR, appending slash if needed
local dir = main::ENV["APTPDFDIR"];
if (substr(dir, length(dir), 1) != main::PCS) { dir .= main::PCS; }
# Specify default output filename
params["outputFile"] = dir . basename(doc_path(doc));
return compose::compose_for_pdf(doc, params);
}
alias ComposePDFFile compose_for_pdf_custom()

-Brandon 🙂
Announcements