[oXygen-user] Setting output file name

Radu Coravu
Thu Nov 5 00:53:17 CST 2009


Dear Steve,

Thank you for contacting us.

 From what it seems the DITA Open Toolkit does not yet have an ANT 
parameter which can be set to indicate the output file name for PDF 
IDIOM transformations.
Of course you can make some changes in the build files to accomplish this.
If for example you open the 
"OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\demo\fo\build.xml" file 
there is a target in it called "publish.map.pdf".
That target contains a parameter like:
<param name="outputFile"
                
value="${dita.map.output.dir}/${dita.map.filename.root}.pdf"/>

so the output file is hardcoded to the name of the map.

There are two options:
1) You can replace the paramter with something hardcoded like:
<param name="outputFile"
                value="${dita.map.output.dir}/customFileName.pdf"/>

2) Create a new property which you can afterwards set from the Oxygen 
parameters tab.
For this, in the beginning of the build.xml where all properties are 
defined, add a new entry:
<property name="pdf.file.name" value="${dita.map.filename.root}" />
and use this entry in the parameter I mentioned above:
<param name="outputFile"
                value="${dita.map.output.dir}/${pdf.file.name}.pdf"/>

Then you will be able to add the "pdf.file.name" as a new parameter in 
the Oxygen transformation scenario "Parameters" tab with your custom 
file name value.

There is a downside to this:
Oxygen will not know what PDF file to open after the transformation 
succeeds so you will either have to open it externally or edit the 
transformation scenario and in the "Output" tab specify explicitly the 
"Other location" to open.

Regards,
Radu

-- 
Radu Coravu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com 


Steve Matlock wrote:
> I'm generating PDFs using the default/demo PDF generator in Oxygen
> 10.x on Vista and using a bookmap and a dita map.
>
> I'm looking for a way to set the output file name explicitly --
> currently the ditamap/bookmap I'm using becomes the output file name.
>
> I've looked through help and through the demo transforms, but I'm not
> finding this. I see that I can do this for PS, HTML, or TXT output.
>
> Is there a way to explicitly set the file name in Oxygen 10.x / DITA?
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>   





More information about the oXygen-user mailing list