Can I use 'html5' DITA-OT plugins with PDF Chemistry?

chrispitude
Posts: 221
Joined: Thu May 02, 2019 2:32 pm

Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Post by chrispitude » Tue Dec 31, 2019 8:57 pm

Hi all,

I have a DITA-OT plugin that modifies the 'html5' output by plugging into the following extension points:

Code: Select all

dita.xsl.topicpull
dita.xsl.strings
dita.xsl.html5
When I install this plugin into the Oxygen DITA-OT, it modifies the "DITA Map PDF - based on HTML5 & CSS" output as expected. However, it does not affect the PDF Chemistry output as expected.

I was hoping that because PDF Chemistry is based on HTML5, it would automatically inherit any modifications to the 'html5' transformation. How can I incorporate my plugin into PDF Chemistry?

I do understand that PDF Chemistry's CSS functionality provides very powerful content modification capabilities. I ask this question because we need the massaged HTML5 output for non-PDF flows, and it would be nice to reuse the HTML5 plugin instead of re-implementing its functionality via CSS.

Thanks!

julien_lacour
Posts: 102
Joined: Wed Oct 16, 2019 3:47 pm

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Post by julien_lacour » Tue Jan 07, 2020 12:44 pm

Hello,

Your extension points are used by the DITA-OT plugin which means that all the DITA transformation will use these extensions points (including the DITA Map HTML5 and obviously the DITA Map PDF - based on HTML5 & CSS transformations).

In DITA Map PDF - based on HTML5 & CSS case, Oxygen PDF Chemistry processor is applied on the HTML5 intermediary file to generate the PDF.
The CSS customization files are applied on this HTML5 file, this is why you can see your modifications inside your browser and debug them.

Oxygen PDF Chemistry isn't based on HTML5, it is based on CSS and Apache FOP XSL-FO to generate PDF from XML or HTML documents.

If you don't need PDF outputs, Oxygen PDF Chemistry processor is not needed, you can simply use the DITA Map HTML5 transformation and customize your file with CSS stylesheets.

Regards,
Julien

chrispitude
Posts: 221
Joined: Thu May 02, 2019 2:32 pm

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Post by chrispitude » Wed Jan 08, 2020 3:26 pm

Hi Julien,

Thanks for your reply. Unfortunately my original post mistakenly referenced the wrong transformation name. Here is the corrected question:
When I install this plugin into the Oxygen DITA-OT, it modifies the "DITA Map HTML5" output as expected. However, it does not affect the "DITA Map PDF - based on HTML5 & CSS" (PDF Chemistry) output as expected.

I was hoping that because PDF Chemistry is based on HTML5, it would automatically inherit any modifications to the 'html5' transformation. How can I incorporate my plugin into PDF Chemistry?
A more specific way to ask my question is: given the three extension points I'm using in the first post, why aren't they applied to the intermediate HTML5 file passed to PDF Chemistry?

Thanks!

julien_lacour
Posts: 102
Joined: Wed Oct 16, 2019 3:47 pm

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Post by julien_lacour » Thu Jan 09, 2020 1:07 pm

Hello,

Could you please send us a small sample and your customization at support@oxygenxml.com.
I will check why the extension point isn't applied on the intermediary HTML5 file.

Regards,
Julien

chrispitude
Posts: 221
Joined: Thu May 02, 2019 2:32 pm

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Post by chrispitude » Sat Jan 25, 2020 4:22 pm

Hi Julien,

I found that the HTML5 extension points (dita.xsl.html5, dita.xsl.strings) are applied; it is specifically the dita.xsl.topicpull extension point that is not applied by PDF Chemistry. I will send a testcase so you can confirm if this is an expected behavior or not.

Thank you!

chrispitude
Posts: 221
Joined: Thu May 02, 2019 2:32 pm

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Post by chrispitude » Tue Jan 28, 2020 4:17 pm

Hi all,

Julien took a look at my testcase and confirmed the problem:
I reproduced your problem, it's a bug on our side: the topicpull is done during the transformation but its modifications are not copied to the merged.html output in this particular case. It seems that this problem is related to the HTML5 PDF transformation only.
I already logged it inside our tracking system, we will let you know where a solution will be available.
Thanks Julien!

- Chris

julien_lacour
Posts: 102
Joined: Wed Oct 16, 2019 3:47 pm

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Post by julien_lacour » Thu Jan 30, 2020 11:34 am

Hello Chris,

You can resolve this situation by adding an XSLT Extension Point to your DITA-OT plugin:

Code: Select all

<feature extension="com.oxygenxml.pdf.css.xsl.merged2merged" value="xref.xsl" type="file"/>
Then use the following stylesheet:
xref.zip
(624 Bytes) Downloaded 31 times
Regards,
Julien

Post Reply