Page 1 of 1

PDF File Name using mainbooktitle element

Posted: Wed Jul 12, 2023 4:02 am
by Tinmen
When I have a ditamap file named

Code: Select all

foo.ditamap
and the book map named

Code: Select all

foobar
running the PDF transform generates the output PDF as foo.pdf.

Is there a method to automatically rename the output PDF automatically to foobar.pdf possibly using args.output.base based on the mainbooktitle element (foobar)?

I currently set the args.output.base value to

Code: Select all

${ask('Message', input_type, '${cfn}')}
, which prompts me to use the default (foo) or change the name to something else, such as foobar.

I am in the process of converting many ditamaps with long file names containing dates and other descriptors. I know I can rename the ditamap files, but I wanted to keep those as is for now.

Re: PDF File Name using mainbooktitle element

Posted: Wed Jul 12, 2023 12:01 pm
by Radu
Hi,
Maybe as value for the "args.output.base" param you could use our ${xpath_eval()} editor variable:
post54730.html#p54730
https://www.oxygenxml.com/doc/ug-editor ... ables.html
Regards,
Radu

Re: PDF File Name using mainbooktitle element

Posted: Wed Jul 12, 2023 5:36 pm
by Tinmen
Thanks! I will take a look at the link.

Regards

Tinmen