Page 1 of 1

How do I prevent resources and their folders from being copied to the output folder during the PDF/PDF2 transformation

Posted: Thu Aug 24, 2017 1:46 pm
by Exotic Hadron
Howdy,

I've noticed that DITA-OT copies resource folders to the output folder while using PDF/PDF2 transformations. As a result, you end up with an output folder that contains not only the transformed PDF files, but also all the folders with PNG files used in the transformed DITA files.
This only happens if I use DITA-OT directly. When building through <OXygen/> XML Author, no resources are copied, but and resulting output, besides the PDF files, contains dita.list and dita.xml.properties files.

Two questions here:
1) How do I prevent DITA-OT from copying these resources?
2) How do I tell Oxygen not to create (or remove) these dita.list and dita.xml.properties files when transformation is complete?

Thank you.

EH

Re: How do I prevent resources and their folders from being copied to the output folder during the PDF/PDF2 transformati

Posted: Fri Aug 25, 2017 8:52 am
by Radu
Hi,

It probably depends on what DITA Open Toolkit version you are using. Oxygen has two bundled DITA Open Toolkits in its "OXYGEN_INSTALL_DIR/frameworks/dita" folder. And you can choose in the Preferences->DITA page which one to use.
The DITA OT 1.8.5 bundled with Oxygen indeed leaves in the output folder the PDF + those two output files.
The DITA OT 2.4.4 bundled with Oxygen leaves in the output folder only the PDF.
Probably from the command line you are using a DITA OT older than 1.8.5 which left also all images there.
DITA OT 1.8 is in an end of life policy, bug fixes and updates are no longer done to it.
What you could try to do would be to use a custom ANT build file:

https://www.oxygenxml.com/doc/versions/ ... -file.html

which after the publishing is done could perform various operations in the output folder, for example delete from there all files except the PDF.

Regards,
Radu

Re: How do I prevent resources and their folders from being copied to the output folder during the PDF/PDF2 transformati

Posted: Fri Aug 25, 2017 12:29 pm
by Exotic Hadron
I am using Oxygen XML Author 16. I admit, it's outdated, but that's all I have for now.

Checking the version of DITA-OT returns the following:

PS C:\Program Files\Oxygen XML Author 16\frameworks\dita\DITA-OT> java -jar lib/dost.jar -version
Picked up _JAVA_OPTIONS: -Xmx1024m -Xms512m
1.8.5
So indeed, it's using an obsolete version of DITA-OT (which is no surprise).

I have read the Using a Custom Build File article, but I don't seem I've got the point. Could you please give a clue on how to configure Oxygen to pick another DITA-OT framework at build time?

Specifying C:\DITA-OT\dita-ot-2.5.1\build.xml in the Custom build file field on the Advanced tab in the DITA Scenario properties did not help, the following error occurs:

Code: Select all



build_init.xml:42: taskdef class org.dita.dost.platform.JobPropertyTask cannot be found
Is there any way I could set Oxygen to use new DITA-OT?

Thank you.

Re: How do I prevent resources and their folders from being copied to the output folder during the PDF/PDF2 transformati

Posted: Fri Aug 25, 2017 2:13 pm
by Radu
Hi,

Recent versions of Oxygen have a Preferences->DITA page in which you can change the default used DITA OT.
For older versions, if you edit the transformation scenario, in the Parameters list there is a "dita.dir" parameter which you need to set to the new DITA OT location. You would need to do this for all transformation scenarios that you want to use.

Regards,
Radu