Different DITA-PDF transformations based on plugin

josecotes
Posts: 21

Different DITA-PDF transformations based on plugin

Fri Aug 19, 2016 7:12 pm

Hi all,

I have created a couple custom plugins based on the org.dita.pdf2 that came with Oxygen as follows:

Image

When I try to produce a PDF from Oxygen, I get the usual menu with all the options:

Image

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
radu_pisoi
Posts: 335
Location: Craiova

Re: Different DITA-PDF transformations based on plugin

Mon Aug 22, 2016 11:14 am

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.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
josecotes
Posts: 21

Re: Different DITA-PDF transformations based on plugin

Sun Aug 28, 2016 6:55 pm

Hi Radu,

This is what I did in the plugin.xml file:
Image

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:
Image

Unfortunately I get this error, which I have not been able to figure out:
Image

Any clues?

Thanks,
radu_pisoi
Posts: 335
Location: Craiova

Re: Different DITA-PDF transformations based on plugin

Mon Aug 29, 2016 11:44 am

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
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
josecotes
Posts: 21

Re: Different DITA-PDF transformations based on plugin

Tue Aug 30, 2016 12:05 am

Hi Radu,

I am pass the error. I made my integrator.xml like this:
Image

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:
Image

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,
radu_pisoi
Posts: 335
Location: Craiova

Re: Different DITA-PDF transformations based on plugin

Tue Aug 30, 2016 12:24 pm

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?
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
josecotes
Posts: 21

Re: Different DITA-PDF transformations based on plugin

Tue Aug 30, 2016 8:56 pm

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,
radu_pisoi
Posts: 335
Location: Craiova

Re: Different DITA-PDF transformations based on plugin

Wed Aug 31, 2016 4:38 pm

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
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
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