PDF output generation problem
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 12
- Joined: Fri Nov 25, 2016 1:51 pm
- Location: Pune , India
- Contact:
PDF output generation problem
Hi ,
I am trying to generate PDF output through my own plugin , but unable to view my output instead of getting successful build. I am new in creating output in PDF. I am running my code on default dita-ot , then it is showing the output PDF. So where am I missing .
build.xml
build_pdf2w_template.xml:-
plugin.xml
integrator.xml
I am trying to generate PDF output through my own plugin , but unable to view my output instead of getting successful build. I am new in creating output in PDF. I am running my code on default dita-ot , then it is showing the output PDF. So where am I missing .
build.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<project>
<import file="build_pdf2w_template.xml"/>
</project>
build_pdf2w_template.xml:-
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.dita.pdf2w" default="dita2pdf2w" basedir=".">
<property name="transtype" location="C:\Program Files\dita-ot-2.4"/>
<target name="dita2pdf2w" description="build PDF" depends="pdf"/>
<target name="pdf" description="build PDF">
<ant antfile="C:\Program Files\dita-ot-2.4\plugins\org.dita.pdf2w\build_pdf2w_template.xml">
<property name="args.input" value="D:\AutoDOSE-Demo\AutoDOSE_Precision_Detergent_Dispenser.ditamap"/>
<property name="args.gen.task.lbl" value="YES"/>
<property name="args.rellinks" value="nofamily"/>
<property name="output.dir" value="C:\"/>
<property name="transtype" value="pdf"/>
</ant>
</target>
</project>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="org.dita.pdf2w">
<require plugin="org.dita.pdf2w"/>
<feature extension="dita.conductor.transtype.check" value="pdf2w"/>
<feature extension="dita.transtype.print" value="pdf2w"/>
<feature extension="dita.conductor.target.relative" file="build.xml"/>
</plugin>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.dita.pdf2w">
<target name="dita2pdf2w.init">
<property name="customization.dir" location="${dita.plugin.org.dita.pdf2w.dir}/cfg"/>
</target>
<target name="dita2pdf2w" depends="dita2pdf2w.init , dita2pdf2w"/>
</project>
Rohit Ghosh
Jr. Software Developer
Jr. Software Developer
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: PDF output generation problem
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 12
- Joined: Fri Nov 25, 2016 1:51 pm
- Location: Pune , India
- Contact:
Re: PDF output generation problem
Thank You Sir ,
Sir I had made few changes on my build_pdf2w_template file. Still not working.
Sir I had made few changes on my build_pdf2w_template file. Still not working.
Rohit Ghosh
Jr. Software Developer
Jr. Software Developer
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: PDF output generation problem
Hi,
Do you integrate your plugin in the DITA Open Toolkit after you make changes to it?
In the build.xml in the target you can also add ANT <echo> elements to output messages that you can use for debug.
In the Oxygen Preferences->DITA page you can choose to always show the ANT console output and see if your messages are emitted.
Regards,
Radu
This does not give me enough details to help you. Have you tried using Jarno Elovirta's PDF plugin generator (I gave the link on my Stackoverflow answer) to generate the PDF plugin? You can compare the generated plugin with yours.I had made few changes on my build_pdf2w_template file. Still not working.
Do you integrate your plugin in the DITA Open Toolkit after you make changes to it?
In the build.xml in the target you can also add ANT <echo> elements to output messages that you can use for debug.
In the Oxygen Preferences->DITA page you can choose to always show the ANT console output and see if your messages are emitted.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 12
- Joined: Fri Nov 25, 2016 1:51 pm
- Location: Pune , India
- Contact:
Re: PDF output generation problem
Hi Sir,
I refer Jarno Elovirta's PDF plugin generator that you had mentioned and i did changes removing build and build template xml. I compared with my plugin with Jarno's created plugins and it is as follows
integrator.xml:-
plugin.xml:-
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="org.dita.pdf2w">
<require plugin="org.dita.pdf2"/>
<feature extension="dita.conductor.transtype.check" value="pdf"/>
<feature extension="dita.transtype.print" value="pdf2"/>
<feature extension="dita.conductor.target.relative" file="integrator.xml"/>
</plugin>
I am integrating on dita-ot batch file , it is successful . When I am running output code (c:\Program Files\dita-ot-2.4\plugins\org.dita.pdf2w>ant -Dargs.input=D:\AutoCOM-Demo\AutoCOM.ditamap -Doutput.dir=C:\ -Dtranstype=pdf it is throwing this error:-
I refer Jarno Elovirta's PDF plugin generator that you had mentioned and i did changes removing build and build template xml. I compared with my plugin with Jarno's created plugins and it is as follows
integrator.xml:-
Code: Select all
<?xml version='1.0' encoding='utf-8'?>
<project name="org.dita.pdf2w">
<target name="dita2pdf.init">
<property location="${dita.plugin.org.dita.pdf2w.dir}/cfg" name="customization.dir" />
<property name="pdf2.i18n.skip" value="true" />
<property location="${dita.plugin.org.dita.pdf2w.dir}/xsl/fo/topic2fo.xsl" name="args.xsl.pdf" />
<property name="args.chapter.layout" value="MINITOC" />
<property name="args.bookmark.style" value="COLLAPSED" />
<property name="args.fo.include.rellinks" value="none" />
</target><target depends="dita2pdf.init, dita2pdf2" name="dita2pdf" />
</project>
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="org.dita.pdf2w">
<require plugin="org.dita.pdf2"/>
<feature extension="dita.conductor.transtype.check" value="pdf"/>
<feature extension="dita.transtype.print" value="pdf2"/>
<feature extension="dita.conductor.target.relative" file="integrator.xml"/>
</plugin>
I am integrating on dita-ot batch file , it is successful . When I am running output code (c:\Program Files\dita-ot-2.4\plugins\org.dita.pdf2w>ant -Dargs.input=D:\AutoCOM-Demo\AutoCOM.ditamap -Doutput.dir=C:\ -Dtranstype=pdf it is throwing this error:-
Unable to locate tools.jar. Expected to find it in C:\Program Files (x86)\Java\jre1.8.0_111\lib\tools.jar
Buildfile: build.xml does not exist!
Build failed
Rohit Ghosh
Jr. Software Developer
Jr. Software Developer
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: PDF output generation problem
Hi,
The "pdf" and "pdf2" transtypes are base transtypes so your plugin needs to define its own transtype.
So the plugin.xml needs to declare the transtype something like:
then your integrator.xml would also change the name of the main target according to the transtype "pdf2w":
Then about this remark:
And the ant transformation should be run in the folder c:\Program Files\dita-ot-2.4 and not in the folder where the plugin's contents are located.
There is a simpler way to run the output generation using the "dita" command in the DITA OT folder:
http://www.dita-ot.org/dev/getting-star ... mmand.html
Regards,
Radu
The "pdf" and "pdf2" transtypes are base transtypes so your plugin needs to define its own transtype.
So the plugin.xml needs to declare the transtype something like:
Code: Select all
<feature extension="dita.transtype.print" value="pdf2w"/>
Code: Select all
<target depends="dita2pdf.init, dita2pdf2" name="dita2pdf2w" />
The transtype must be "-Dtranstype=pdf2w".When I am running output code (c:\Program Files\dita-ot-2.4\plugins\org.dita.pdf2w>ant -Dargs.input=D:\AutoCOM-Demo\AutoCOM.ditamap -Doutput.dir=C:\ -Dtranstype=pdf
And the ant transformation should be run in the folder c:\Program Files\dita-ot-2.4 and not in the folder where the plugin's contents are located.
There is a simpler way to run the output generation using the "dita" command in the DITA OT folder:
http://www.dita-ot.org/dev/getting-star ... mmand.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 12
- Joined: Fri Nov 25, 2016 1:51 pm
- Location: Pune , India
- Contact:
Re: PDF output generation problem
Hi Sir,
I am not using Oxygen right now. So I am not finding any build/ant file in Jarno's plugin creation. So where do I have to include the ant command for input/output path ?
I have to follow this ?http://www.dita-ot.org/2.3/user-guide/c ... cript.html
Then my entire integrator will be changed?
I am not using Oxygen right now. So I am not finding any build/ant file in Jarno's plugin creation. So where do I have to include the ant command for input/output path ?
I have to follow this ?http://www.dita-ot.org/2.3/user-guide/c ... cript.html
Then my entire integrator will be changed?
Rohit Ghosh
Jr. Software Developer
Jr. Software Developer
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: PDF output generation problem
Hi,
Jarno's plugin generator generates a ZIP file.
You can integrate the zipped plugin in the existing DITA OT by following these instructions:
http://www.dita-ot.org/dev/dev_ref/plug ... lling.html
Regards,
Radu
Jarno's plugin generator generates a ZIP file.
You can integrate the zipped plugin in the existing DITA OT by following these instructions:
http://www.dita-ot.org/dev/dev_ref/plug ... lling.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service