Page 1 of 1

PDF Syntax Highlighting

Posted: Fri Jan 03, 2020 5:13 am
by easirois
Hi,

I'm trying to get syntax highlighting to work in a PDF output outside of oXYgen (16.1) with DITA 1.8.5. I do have a license for webhelp and both plugins (webhelp and highlight), but I can't get the highlighting to work at all. It just keeps defaulting to the code in the grey background. Is there something I'm missing in terms of requirements. I'm using the out-of-the-box config. Testing Java and XML syntax highlighting

Eric

Re: PDF Syntax Highlighting

Posted: Tue Jan 07, 2020 4:07 pm
by Radu
Hi Eric,

Oxygen 16 is very old, it's in our end of support policy:

https://www.oxygenxml.com/eol.html

did you add this plugin "OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.highlight" to the DITA OT 1.8.5 that you are using out of the box?
Did you add the proper @outputclass attribute values like language-xml on the codeblock elements?
Can you maybe add some xsl:messages in the XSLT stylesheets from the "com.oxygenxml.highlight" plugin to see what's going on?

Regards,
Radu

Re: PDF Syntax Highlighting

Posted: Tue Jan 14, 2020 6:20 pm
by easirois
Hi Radu,

I did place the plugins in a vanilla OT and ran the build for pdf2. I placed a bunch of "woohoo" messages in the pdfHighlight.xsl file and they do appear in the logs. So the template is being called, but the syntax highlight is not found in the output.

transform.topic2fo.main:
[xslt] Processing D:\projects\temp\stage1a.xml to D:\projects\\temp\stage2.fo
[xslt] Loading stylesheet D:\data\DITA-OT1.8.5\plugins\org.dita.pdf2\xsl\fo\topic2fo_shell_fop.xsl
[xslt] D:\data\DITA-OT1.8.5\plugins\org.dita.pdf2\xsl\fo\front-matter.xsl:82:40: Warning! A variable with no following sibling instructions has no effect
[xslt] woohoo
[xslt] woohoo
[xslt] woohoo
[xslt] [PDFX010W][WARN]: Index generation is not supported in FOP.

Eric

Re: PDF Syntax Highlighting

Posted: Tue Jan 14, 2020 8:41 pm
by easirois
And when I try to output XHTML, then I get the following error:

java.lang.ClassNotFoundException: net.sf.saxon.om.AxisInfo

Which is not available in the version of Saxon that is shipped with that version of the OT. But then we get into a chicken and egg issue. If i update the version of Saxon that contains that class, then I get errors regarding java extension.

Eric

Re: PDF Syntax Highlighting

Posted: Wed Jan 15, 2020 10:32 am
by Radu
Hi,

Sorry but we no longer support such old DITA OT versions.

Regards,
Radu