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

Exotic Hadron
Posts: 25

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

Thu Aug 24, 2017 1:46 pm

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
Radu
Posts: 5376

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

Fri Aug 25, 2017 8:52 am

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/19.0/ug-editor/topics/dita-map-use-your-own-build-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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Exotic Hadron
Posts: 25

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

Fri Aug 25, 2017 12:29 pm

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.
Radu
Posts: 5376

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

Fri Aug 25, 2017 2:13 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest