Page 1 of 1

Newline in richtext annotations are removed after reimporting

Posted: Thu Jun 27, 2019 10:37 am
by AnKeilha
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 89 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 83 times
Thank you very much in advance.

Regards
AnKeilha

Re: Newline in richtext annotations are removed after reimporting

Posted: Thu Jun 27, 2019 4:45 pm
by AnKeilha
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 100 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

Re: Newline in richtext annotations are removed after reimporting

Posted: Thu Jun 27, 2019 5:06 pm
by TrackerSupp-Daniel
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,

Re: Newline in richtext annotations are removed after reimporting

Posted: Tue Jul 02, 2019 6:14 am
by AnKeilha
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

Re: Newline in richtext annotations are removed after reimporting

Posted: Tue Jul 02, 2019 7:31 am
by Will - Tracker Supp
We'll certainly do what we can :)

Re: Newline in richtext annotations are removed after reimporting  SOLVED

Posted: Thu Sep 12, 2019 12:46 pm
by AnKeilha
According to https://www.pdf-xchange.com/produc ... #8.0.332.0 the Issue T# 4804 has been fixed. I tested it myself today and it seems to work.

Re: Newline in richtext annotations are removed after reimporting

Posted: Thu Sep 12, 2019 1:19 pm
by Tracker Supp-Stefan
:D