oxygenxml / dita-ot-css-pdf

Plugin that converts DITA Maps to PDF using CSS 3 stylesheets.
Apache License 2.0
17 stars 8 forks source link

dita-ot-3.1.2/${dita.plugin.com.oxygenxml.common.dir}/lib does not exist #13

Closed svenihoney closed 6 years ago

svenihoney commented 6 years ago

I have installed this into a DITA-OT 3.1.2 installation and don't get beyond the point that some sort of common oxygenxml library plugin is searched. Please provide a link to this library or perhaps give a hint in the Readme that this library is needed but not available.

Thanks, Sven

raducoravu commented 6 years ago

Sorry for the delay, we'll need some time to sort this out. In the meantime if you download Oxygen XML Editor, it has a plugin "OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.common" which should be also used along with this one.

svenihoney commented 6 years ago

Thanks for the hint, but for this I need a licensekey.txt:

pdf-css.init-template:
     [echo] Publishing template root path: 
     [echo] Publishing template descriptor: 
Cannot find a valid "licensekey.txt" license file in:
- the DITA-OT directory: "/run/media/sven/a9fec0a7-5b35-4075-9ee7-2943e85cf5ac/tmp/dita-ot-3.1.2"
- the plugin base directory: "/home/sven/tmp/dita-ot-3.1.2/plugins/com.oxygenxml.pdf.css"

So it should be made clear that this is not an open-source project.

raducoravu commented 6 years ago

@svenihoney we'll try to have some time to remove the dependencies to this extra plugin which indeed needs a license. If you want to manually remove them before running the DITA OT integrator:

Open "com.oxygenxml.pdf.css\build.xml" find the target:

 <target name="pdf-css.init-template" depends="dita2pdf2.init, build-init">    

and remove all its contents so that it becomes something like:

    <target name="pdf-css.init-template" depends="dita2pdf2.init, build-init"></target>

Open the XSLT stylesheet "com.oxygenxml.pdf.css\xsl\merged2html5\html5_template.xsl" and remove the line:

  <xsl:import xmlns:dita="http://dita-ot.sourceforge.net" href="template:xsl/com.oxygenxml.pdf.css.xsl.merged2html5"/> 

Open the XSLT stylesheet "com.oxygenxml.pdf.css\xsl\merged2merged\merged_template.xsl" and remove the line:

 <xsl:import href="template:xsl/com.oxygenxml.pdf.css.xsl.merged2merged"/>

After this things should start working. If you install an external Oxygen PDF Chemistry engine: https://www.oxygenxml.com/chemistry.html it should start to be used. Or you can set the DITA OT transformation parameter "css.processor.type" to "antenna-house" or "prince" and if they are installed they should be used instead.

dan-caprioara commented 6 years ago

Hi, I commited a new build.xml that uses a fallback catalog for the case the com.oxygenxml.common plugin is not available. You should just update the build.xml with the new changes and avoid for the moment the above proposed XSLT changes. Let uk know if it works correctly. Thank you, Dan

svenihoney commented 6 years ago

Works perfectly. Tested also against dita 3.1.2, but it failed with ...dita-ot-3.1.2/plugins/com.oxygenxml.pdf.css/build-merged2merged.xml:26: javax.xml.transform.TransformerConfigurationException: net.sf.saxon.s9api.SaxonApiException: Errors were reported during stylesheet compilation

I assume this is because Oxygen is still based on DITA v2.

raducoravu commented 6 years ago

The problem with DITA OT 3.x is that by default it uses the Saxon 9.8 XSLT Home Editing processor which no longer supports Java extensions and our XSLT code still has some Java extensions. We are working to remove those.