Use Custom Build File to reorder PDF

Post here questions and problems related to editing and publishing DITA content.
Ronser
Posts: 13
Joined: Thu Apr 12, 2018 5:33 pm

Use Custom Build File to reorder PDF

Post by Ronser »

Hi,

After I build a PDF, I want to automatically reorder the pages using another .bat file. This reorders/reorientates the pages in the way I want.

Can I automate this process? After the pdf has built, I want to add a further command to run this .bat file. I think I need to add an <exec></exec> to the build.xml file but I don't really know where/how to add it in the build.xml.

Are ther eany more detailed examples than this: https://www.oxygenxml.com/doc/versions/ ... -file.html

Thanks for your help,

Ronan
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: Use Custom Build File to reorder PDF

Post by Radu »

Hi Ronan,

I agree that you need to write your own ANT build file which calls the default processing and then calls the ANT <exec>, something like:

Code: Select all

<project basedir="." default="dist">
<!--The DITA OT default build file-->
<import file="build.xml"/>
<target name="dist">
<!--Call the DITA OT default target-->
<antcall target="init"/>
<!-- You could run your script here -->
<!--<exec></exec>-->
</target>
</project>
More about the ANT exec task:

https://ant.apache.org/manual/Tasks/exec.html

You should try to find an ANT tutorial and get starting writing a small build file, then progress from there.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply