Page 1 of 1
Different DITA-PDF transformations based on plugin
Posted: Fri Aug 19, 2016 7:12 pm
by josecotes
Hi all,
I have created a couple custom plugins based on the org.dita.pdf2 that came with Oxygen as follows:
When I try to produce a PDF from Oxygen, I get the usual menu with all the options:
My question is. How do I add an option so, i.e. it says:
DITA Map PDF - Client 1 --> which will use the org.dita.pdf2.client1
DITA Map PDF - Client 2 --> which will use the org.dita.pdf2.client2
I know I can Duplicate DITA Map PDF and modify certain parameters in there, but not sure how to specify which plugin I want to use.
Thanks for the help
Re: Different DITA-PDF transformations based on plugin
Posted: Mon Aug 22, 2016 11:14 am
by radu_pisoi
Hi,
In this case when you have multiple customization plugins you need to declare an unique
transtype for each customization plugin because this
transtype will be used to identify one or other.
Code: Select all
<feature extension="dita.conductor.transtype.check" value="test-pdf2"/>
To assign a certain customization plugin to an oXygen transformation scenario, after you have duplicated the 'DITA Map PDF' transformation scenario, select the
Parameters tab and specify for the
transtype parameter the value you have defined in the customization plugin.
Re: Different DITA-PDF transformations based on plugin
Posted: Sun Aug 28, 2016 6:55 pm
by josecotes
Hi Radu,
This is what I did in the
plugin.xml file:
Then, on the DITA-OT folder, I ran:
Code: Select all
ant -f integrator.xml -verbose strict
As instructed, I duplicated the Dita Map PDF and changed the
transtype parameter to
Client1:
Unfortunately I get this error, which I have not been able to figure out:
Any clues?
Thanks,
Re: Different DITA-PDF transformations based on plugin
Posted: Mon Aug 29, 2016 11:44 am
by radu_pisoi
Hi,
Your plugin seems to declare correctly the new transtype. The problem might be in the 'integrator.xml' Ant build file that should declare a 'dita2Client1' target.
See more details in the 'Adding a new transformation type' topic from the DITA-OT documentation:
http://www.dita-ot.org/2.3/dev_ref/plug ... stype.html
Re: Different DITA-PDF transformations based on plugin
Posted: Tue Aug 30, 2016 12:05 am
by josecotes
Hi Radu,
I am pass the error. I made my
integrator.xml like this:
The issue now is that it seems as if my PDF is printing with the styles from
org.dita.pdf2 and not from
org.dita.pdf2.client1. In short, my customizations are not showing up at all and are defaulting back to org.dita.pdf2.
I even try changing this, but no luck:
I read the link you sent me and this other one (
http://www.dita-ot.org/2.0/readme/dita2 ... ation.html), and it seems that I am doing everything right. Is it possible that Oxygen is re-writing something so my plugin defaults back to org.dita.pdf2?
Thanks,
Re: Different DITA-PDF transformations based on plugin
Posted: Tue Aug 30, 2016 12:24 pm
by radu_pisoi
Hi,
Is it possible that Oxygen is re-writing something so my plugin defaults back to org.dita.pdf2?
The oXygen runs the DITA-OT transformation as an external process, so I don't think oXygen re-write something that brokes your customization.
The procedure that you refer, Customizing PDF output, should work without no problem with oXygen.
Did you create a 'catalog.xml' that points to your customization stylesheets? Also, don't forget to run the DITA-OT integrator(Run DITA OT Integrator transformation scenario) after each modification in your plugin.
If this does not help you, could you send us the customization plugin to take a look?
Re: Different DITA-PDF transformations based on plugin
Posted: Tue Aug 30, 2016 8:56 pm
by josecotes
Hi Anbu,
Are the instructions for DITA-OT 2.x the same as for 1.x? I am working in 1.5 and that might be the issue I am running into, as it seems that I am doing all the correct things.
The
catalog.xml was updated when I ran ant -f integrator.
Here is the DITA-OT I am using:
https://www.dropbox.com/s/muq9x7t1x48kp ... T.zip?dl=0
Thanks again,
Re: Different DITA-PDF transformations based on plugin
Posted: Wed Aug 31, 2016 4:38 pm
by radu_pisoi
Hi,
It seems that you have duplicated the PDF2 plugin entirely, which is not the right way.
To create a PDF customization plugin, please follow the 'Creating a simple PDF plug-in' procedure:
http://www.dita-ot.org/2.3/dev_ref/pdf- ... ample.html