PDF File Name using mainbooktitle element

Post here questions and problems related to editing and publishing DITA content.
Tinmen
Posts: 21
Joined: Wed Jun 28, 2023 11:49 pm

PDF File Name using mainbooktitle element

Post 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.
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: PDF File Name using mainbooktitle element

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Tinmen
Posts: 21
Joined: Wed Jun 28, 2023 11:49 pm

Re: PDF File Name using mainbooktitle element

Post by Tinmen »

Thanks! I will take a look at the link.

Regards

Tinmen
Post Reply