Include comments in PDF output
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 32
- Joined: Tue Dec 18, 2012 3:22 am
Include comments in PDF output
Hi,
My team's engineers prefer to review using PDFs.
How do I include both comments and link text in PDF output for their review?
Comments are excluded from the default PDF transforms, but you can use File > Print to create a PDF that displays comments. However, this PDF doesn't include the link endterm text.
Or is there an option I can set in a duplicated PDF transform scenario that enables comment display?
Thanks.
My team's engineers prefer to review using PDFs.
How do I include both comments and link text in PDF output for their review?
Comments are excluded from the default PDF transforms, but you can use File > Print to create a PDF that displays comments. However, this PDF doesn't include the link endterm text.
Or is there an option I can set in a duplicated PDF transform scenario that enables comment display?
Thanks.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Include comments in PDF output
Hi,
You are using Docbook, right?
If you use Oxygen's own way of adding comments (the "Add Comment" toolbar action), what Oxygen does to mark comments in the XML code is to add custom processing instructions which do not influence the published content of the XML in any way. If you want to see these comments in the Docbook PDF output you would need a customization stylesheet which would somehow convert our processing instructions to specific XSL-FO elements, this would not be an easy task.
Other two workarounds:
1) If you use File->Print indeed you get the comments in the printed output (and you can print to PDF this way). And in Oxygen 14.2 when editing content in the Author mode the links will also show static text which is obtained from the target elements. So the printed version should also have the link text in place.
2) Docbook has a special element called remark:
http://www.docbook.org/tdg/en/html/remark.html
You could use that element to add comments to Docbook content. The PDF output does not show them by default but you can edit the PDF transformation scenario, click the "Parameters" button and set the parameter draft.mode to yes. These comments are not as pretty or flexible as Oxygen's comments though.
Regards,
Radu
You are using Docbook, right?
If you use Oxygen's own way of adding comments (the "Add Comment" toolbar action), what Oxygen does to mark comments in the XML code is to add custom processing instructions which do not influence the published content of the XML in any way. If you want to see these comments in the Docbook PDF output you would need a customization stylesheet which would somehow convert our processing instructions to specific XSL-FO elements, this would not be an easy task.
Other two workarounds:
1) If you use File->Print indeed you get the comments in the printed output (and you can print to PDF this way). And in Oxygen 14.2 when editing content in the Author mode the links will also show static text which is obtained from the target elements. So the printed version should also have the link text in place.
2) Docbook has a special element called remark:
http://www.docbook.org/tdg/en/html/remark.html
You could use that element to add comments to Docbook content. The PDF output does not show them by default but you can edit the PDF transformation scenario, click the "Parameters" button and set the parameter draft.mode to yes. These comments are not as pretty or flexible as Oxygen's comments though.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 32
- Joined: Tue Dec 18, 2012 3:22 am
Re: Include comments in PDF output
Hi Radu,
Thanks! Some followup questions:
1. Do remarks appear only in a PDF with draft.mode set to "yes"? I duplicated a WebHelp transform and set the draft.mode, but the remarks did not appear in the WebHelp output.
2. Which XSL do I need to modify so the remark text displays in red in the PDF? As it currently displays as black italicized font, it's easy to miss it or mistake it for a book reference.
Thanks! Some followup questions:
1. Do remarks appear only in a PDF with draft.mode set to "yes"? I duplicated a WebHelp transform and set the draft.mode, but the remarks did not appear in the WebHelp output.
2. Which XSL do I need to modify so the remark text displays in red in the PDF? As it currently displays as black italicized font, it's easy to miss it or mistake it for a book reference.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Include comments in PDF output
Hi,
About making this work in WebHelp, the WebHelp publishing is done using an ANT script. In Oxygen 14.2 (which will be released in a couple of weeks) you will be able to configure this draft.mode parameter by editing the transformation scenarios directly but right now you must edit the ANT build file:
OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/com.oxygenxml.webhelp/build_docbook.xml
and set the draft.mode parameter as an XSLT parameter when the XSLT stylesheets are called.
which you can change (or create an XSLT customization which overrides the template) something like:
You should also try to join the Docbook users List, it is also a good place where to ask customization questions.
Regards,
Radu
Sorry, it seems that the actual parameter which controls remarks is show.comments which by default is set to "1" (which means that it shows the remarks). You can set it to "0" to hide them.1. Do remarks appear only in a PDF with draft.mode set to "yes"? I duplicated a WebHelp transform and set the draft.mode, but the remarks did not appear in the WebHelp output.
About making this work in WebHelp, the WebHelp publishing is done using an ANT script. In Oxygen 14.2 (which will be released in a couple of weeks) you will be able to configure this draft.mode parameter by editing the transformation scenarios directly but right now you must edit the ANT build file:
OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/com.oxygenxml.webhelp/build_docbook.xml
and set the draft.mode parameter as an XSLT parameter when the XSLT stylesheets are called.
In this XSL OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/fo/inline.xsl there is an xsl:template like:2. Which XSL do I need to modify so the remark text displays in red in the PDF? As it currently displays as black italicized font, it's easy to miss it or mistake it for a book reference.
Code: Select all
<xsl:template match="d:comment|d:remark">
<xsl:if test="$show.comments != 0">
<fo:inline font-style="italic">
<xsl:call-template name="inline.charseq"/>
</fo:inline>
</xsl:if>
</xsl:template>
Code: Select all
<xsl:template match="d:comment|d:remark">
<xsl:if test="$show.comments != 0">
<fo:inline font-style="italic" color="red">
<xsl:call-template name="inline.charseq"/>
</fo:inline>
</xsl:if>
</xsl:template>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: Include comments in PDF output
Post by Frank Ralf »
We have the same feature request for DITA content transformed to PDF. The users want to see the review comments from oXygen also in PDF. Is there a similar workaround for DITA?
TIA
Frank
TIA
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Include comments in PDF output
Hi Frank,
When you edit with Oxygen a DITA topic there are two ways in which you can add comments to your content:
1) Using the Oxygen toolbar->Add Comment action. This action adds the comment as an XML processing instruction which can only be properly rendered by Oxygen. So this comment will not be visible in the PDF output if you publish the DITA Map to PDF.
2) Adding DITA-specific draft-comment elements. If you take this approach and edit the transformation scenario used to publish to PDF from Oxygen, in the Parameters list there is a parameter called args.draft which can be set to yes and the published PDF will also contain the comments.
Regards,
Radu
When you edit with Oxygen a DITA topic there are two ways in which you can add comments to your content:
1) Using the Oxygen toolbar->Add Comment action. This action adds the comment as an XML processing instruction which can only be properly rendered by Oxygen. So this comment will not be visible in the PDF output if you publish the DITA Map to PDF.
2) Adding DITA-specific draft-comment elements. If you take this approach and edit the transformation scenario used to publish to PDF from Oxygen, in the Parameters list there is a parameter called args.draft which can be set to yes and the published PDF will also contain the comments.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: Include comments in PDF output
Post by Frank Ralf »
Hi Radu,
Thanks for the pointers!
Cheers,
Frank
Thanks for the pointers!
Cheers,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.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