Newline in richtext annotations are removed after reimporting  SOLVED

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Post Reply
AnKeilha
User
Posts: 38
Joined: Fri Apr 27, 2018 11:17 am

Newline in richtext annotations are removed after reimporting

Post by AnKeilha » Thu Jun 27, 2019 10:37 am

Hello,
I am using version 8.0, build 331.0 of the standalone PDFXChange-Editor (the same problem also occurs, when I use the SDK):

When using the typewriter-tool, textbox-tool, callout-tool or the sticky-note-tool and newline are used in the text content like so
Screenshot-Annotations-correct.png
everything seems fine. When I export the annotations as an XFDF, I see some 
 (carriage return) to denote the newlines, which is a bit strange, but fair enough if PDFXChange-Editor wants to export it that way:
exported.zip
(1.23 KiB) Downloaded 11 times
However, after importing this XFDF into an empty PDF, the newlines are removed:
Screenshot-Annotations-incorrect.png
When I export the XFDF again, I see that the 
 (see above) have been replaced by   (space):
exported-again.zip
(1.25 KiB) Downloaded 9 times
Thank you very much in advance.

Regards
AnKeilha

AnKeilha
User
Posts: 38
Joined: Fri Apr 27, 2018 11:17 am

Re: Newline in richtext annotations are removed after reimporting

Post by AnKeilha » Thu Jun 27, 2019 4:45 pm

As this functionality is quite important to us, I did some more digging:

1. The original exported.xfdf (with "
" in it) seems to work fine when I import it into the "good", old Adobe Reader 11.
2. When I use line breaks in Adobe Reader 11, they use "
" for the XFDF-export, which is essentially the same as the "
" you are using.
3. When I replace all the "&#13;" by "<br/>" (
exported-withBrTag.zip
(1.25 KiB) Downloaded 9 times
) the import into the PDFXChange-Editor seems to work fine. The result looks exactly like the first (correct) screenshot (see above). Although I am not quite sure, if using br-Tags for newlines is ideal from a richtext point of view, the Adobe Reader 11 seems to support it as well. => good enough, I guess

This means that we are probably going to use what I described in point 3 as a workaround, unless you could provide a quick fix for this. Do you see any problems with the workaround? Do you have any suggestions?

Unfortunately, workarounds for the XFDF-import are starting to pile up on our end (see also viewtopic.php?f=62&t=32585#p133820 ). :(

I would really appreciate some feedback on this.

Regards
AnKeilha

User avatar
TrackerSupp-Daniel
Site Admin
Posts: 2703
Joined: Wed Jan 03, 2018 6:52 pm

Re: Newline in richtext annotations are removed after reimporting

Post by TrackerSupp-Daniel » Thu Jun 27, 2019 5:06 pm

Hello AnKeilha,

Thank you for the report, As per your other thread a ticket has already been made:
RT#4804: Newline breaks XFDF-import

This ticket has now been assigned a developer and action is ongoing, however I canot speak for when exactly it will be resolved. I have added notes about your current workaround, but as the import works correctly with <br/> tags, I see no reason not to do this.

Kind regards,
Daniel McIntyre
Support Technician
Tracker Software Products (Canada) LTD

Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623

AnKeilha
User
Posts: 38
Joined: Fri Apr 27, 2018 11:17 am

Re: Newline in richtext annotations are removed after reimporting

Post by AnKeilha » Tue Jul 02, 2019 6:14 am

Hello Daniel,
there is an additional caveat of this workaround if you are trying to be downwards compatible to the old PdfViewer/PdfViewer SDK: The PdfViewer does not interpret the br-tags as newlines. For this you need to use "&#13;". In our case this means that we have to substitute the br-tags by "&#13;" before we perist the XFDF data. A bit tricky, but it seems to work.

However, a fix for this would be very much appreciated.

Kind regards,
Andreas

User avatar
Will - Tracker Supp
Site Admin
Posts: 6819
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Newline in richtext annotations are removed after reimporting

Post by Will - Tracker Supp » Tue Jul 02, 2019 7:31 am

We'll certainly do what we can :)
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com

AnKeilha
User
Posts: 38
Joined: Fri Apr 27, 2018 11:17 am

Re: Newline in richtext annotations are removed after reimporting  SOLVED

Post by AnKeilha » Thu Sep 12, 2019 12:46 pm

According to https://www.tracker-software.com/produc ... #8.0.332.0 the Issue T# 4804 has been fixed. I tested it myself today and it seems to work.


Post Reply