Generating PDF comments using args.draft=yes

xephon
Posts: 95
Location: Hamburg/Germany

Generating PDF comments using args.draft=yes

Thu Dec 18, 2014 12:54 pm

Hi,

it would be nice to transform the content of the following custom CSS elements to real comments in the transformation output result:
  • oxy_content
  • oxy_comment
  • oxy_delete
  • oxy_insert

I am astonished, because I could not find anything about this subject in the forum.

My questions:

  • Is it possible to pass the oxy elements to the output (plain old XHTML or the pdf2 topic.fo) to write an extension? I'd really appreciate a code snippet, if yes.
  • Can Apache FOP generate PDF comments using XSL:FO?

Best regards,
Stefan
Join the DOCTALES DITA development team :arrow: https://doctales.atlassian.net/wiki
Radu
Posts: 5223

Re: Generating PDF comments using args.draft=yes

Thu Dec 18, 2014 3:46 pm

Hi Stefan,

We've had requests in the past but we have not yet created DITA OT plugins to somehow render Oxygen change tracking and comment changes in the published XHTML-based or standard PDF output.

Implementing such a plugin would be quite complicated. We use processing instructions to mark changes and comments and for example comments can start in any place of the document and end in any place of the document, so that the content between the start and end processing instructions is not necessarily wellformed so you cannot wrap all the content between the start and end processing instructions in a single HTML or XSL-FO element and match that element in the output to have a certain style.

We also have some special change tracking for recording attribute changes, surround of elements and split of elements which again would be very hard to represent in an output document.

For the PDF output you would have two alternatives:

1) You can open the DITA Map in the DITA Maps Manager view, click the "Open Map in Editor with Resolved topics" button, then on the DITA Map opened in the main editor use the Styles drop-down to select the "Print ready" rendering. Then use the File->Print action to print the map to a PDF printer driver like win2pdf.

2) Oxygen 16.1 comes with a new type of experimental DITA OT transformation which tries to use CSS with the commercial Prince XML processor to obtain PDF from DITA without the need to obtain XSL-FO.
That transformation tries to mark and add side callouts in the PDF for the start of comment and insertion changes. But it does not highlight the entire comment or inserted/deleted area.

Maybe for the XHTML-based outputs a DITA OT plugin could preserve and pass the Oxygen comments to the XHTML output and maybe then use Javascript with a library like JQuery to highlight all content between those processing instructions.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
xephon
Posts: 95
Location: Hamburg/Germany

Re: Generating PDF comments using args.draft=yes

Thu Dec 18, 2014 6:35 pm

Hi Radu,

thanks a lot for your suggestions. I'll test the trick with the DITA-Map "Print ready" styles. Very good idea. :D Maybe that fits my needs already.

I have two more transformation scenarios on my todo list, this one would have a lower prio. Maybe I come back to this later on. I'd prefer a PDF-based solution, because you'd be able to communicate within the PDF and you'd be able to archive the file. Probably it would be much easier to render if the comments are not used across element borders. It would be nice, if Oxygen would have an option to restrict the usage of the elements by config to avoid issues later on, but that's just an intellectual game.

I do not want to use another commercial renderer, so Prince is not an option for us.

Maybe someone else has an answer to my second question.

I wish you a merry X-mas!

Best regards,
Stefan
Join the DOCTALES DITA development team :arrow: https://doctales.atlassian.net/wiki
Radu
Posts: 5223

Re: Generating PDF comments using args.draft=yes

Fri Dec 19, 2014 10:01 am

Hi Stefan,

Maybe someone else has an answer to my second question.


The forum is quite a static place, regular forum users are not automatically notified when a new post was added. If you want to know more opinions about a certain question you should write an email on the Oxygen Users List:

http://www.oxygenxml.com/mailinglists.html#oxygen-user

As far as I know PDF comments are not in the standard and they are not supported by Apache FOP. RenderX XEP has an extension for this:

http://www.renderx.com/reference.html#PDF%20Note%20Annotations

I wish you a merry X-mas!


Thanks Stefan, Merry Christmas to you too.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
oXyBoston21
Posts: 3

Re: Generating PDF comments using args.draft=yes

Tue Sep 01, 2015 4:00 pm

We do not use DITA, and I have read the other replies about the ability to display change bars.

So, to make sure I have not missed anything, at this time, there is no practical, "non-DITA" way to display change bars in a PDF using oXygen. Is that correct?

Thanks.

- Bob
adrian
Posts: 2337

Re: Generating PDF comments using args.draft=yes

Tue Sep 01, 2015 5:09 pm

Hi,

What type of XML documents are you using?
There is no generic way to produce PDF from any type of XML document. There's usually an XSL tailored for each type of XML document that produces an intermediary FO, which is then processed into PDF. This tailored XSL has to also know how to process the Oxygen change tracking information (processing instructions) so that they end up in the PDF output.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
oXyBoston21
Posts: 3

Re: Generating PDF comments using args.draft=yes

Tue Sep 01, 2015 6:07 pm

We are using DocBook4. No DITA. I am a new user of oXygen.

Using Document > Transformation > Configuration Transformation Scenarios and then choosing the DocBook PDF scenario with Type of "XML XSLT" is how I have been creating a PDF from a single file, just using the default style for now.

We have recently migrated from FrameMaker and I am wondering if there is a way to display change bars in a PDF, but in a way that you can control. Sounds like one could maybe do that via an XSL style sheet that is configured to display change bars?

Thanks.

- Bob
adrian
Posts: 2337

Re: Generating PDF comments using args.draft=yes

Wed Sep 02, 2015 12:15 pm

Hi,

For DocBook4 we do not provide an out-of-the-box solution for including the change tracking information in the PDF output.

As Radu mentioned in a post above, an alternative solution is to use Print to PDF:
Radu wrote:Then use the File->Print action to print the map to a PDF printer driver like win2pdf.
If you're on OS X you have to option to Print to PDF in the Print dialog.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
oXyBoston21
Posts: 3

Re: Generating PDF comments using args.draft=yes

Wed Sep 02, 2015 7:13 pm

Thanks Adrian. I guess I may have skipped over that suggestion because I thought it was DITA-specific. Will explore further.
Radu
Posts: 5223

Re: Generating PDF comments using args.draft=yes

Fri Oct 28, 2016 9:30 am

Hi,

Starting with Oxygen 18.1 which we released a couple of weeks ago, Oxygen change tracking information will also be visible in the WebHelp and classic PDF outputs by enabling the show.changes.and.comments parameter.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
lvellema
Posts: 1

Re: Generating PDF comments using args.draft=yes

Thu Mar 30, 2017 8:47 pm

Radu,

Does this show.changes.and.comments parameter still only work for DITA content and not for DocBook? (And if yes, do you have any idea what the prospects for extending it to DocBook look like?)

Thanks,
Leah
Radu
Posts: 5223

Re: Generating PDF comments using args.draft=yes

Fri Mar 31, 2017 8:52 am

Hi Leah,

We plan to release Oxygen 19.0 in a couple of weeks and Oxygen 19.0 will come with a predefined "Docbook to PDF with Change Tracking" transformation scenario. The scenario will be based on an ANT build file which you can probably customize and fit in your workflow.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 2 guests