Text flow upon copying affected by flattened objects underneath  SOLVED

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

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

Post Reply
DIV
User
Posts: 252
Joined: Fri Jun 23, 2017 1:47 am

Text flow upon copying affected by flattened objects underneath

Post by DIV »

PDF_autosplittingText4.pdf
(8.85 KiB) Downloaded 39 times
I followed the advice at https://forum.pdf-xchange.com/viewtopic.php?f=62&t=36126 relating to my previous query "Can a text object completely obscure an underlying image?"

My workflow is more-or-less as follows.
  1. Open scanned document with some blurred content.
  2. Add a rectangle annotation (using the Rectangle Tool) above the blurred content, and set the fill to white so as to cover the blurred content.
  3. Use the "flatten annotations feature", which converts the rectangle annotation (editable as a Comment) to an "XForm" object (editable as a Shape).
  4. Add new text over the flattened rectangle.
In the attachment is an example of a weird issue I noticed where the text 'flows' differently in the two locations upon copying (and pasting into a text editor).

Code: Select all

Unaffected:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Affected:
Lorem
 ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore
 et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate
 velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat 
non
proident,
 sunt in culpa qui officia deserunt mollit anim id est laborum.
Notice the additional line breaks added in the second instance that aren't visibly present in the original.

It took me a long while to reproduce this 'simple' example, and — frankly — I'm not entirely sure how I did it. But I did notice a few things.
  • In the sample file the problem may be related to overlapping of two flattened objects, which also (accidentally) happened in my original file (which I only just realised).
    • Adjusting the size of the two flattened objects in my original file (by using the Edit tool) so that they no longer overlap fixed the incorrect flow problem there.
  • Moving the text somewhere else changes the flow upon copying (as seen when pasting elsewhere).
  • There are two XForm objects shown in the Content pane that I cannot match with items on the page.
  • The fill colour ("Fill Color") of the green-rimmed rectangle is shown in the Page Content Properties pane as black, even though the actual fill appears to be None.
  • If you click Edit Text now in the sample file, with Edit Text Elements as Blocks selected, it is clear that there are several separate blocks for the "Affected" instance, but only one for the "Unaffected" instance. However I want to strongly emphasize that both text objects were created in the same way: only the positioning is different. So the separate blocks have somehow been automatically created by Editor (I don't know exactly when/why).
    • This happened in my original file too. I then replaced the text to ensure only a single block was present, but that didn't fix the flow problem (until I resized the flattened rectangles to avoid them overlapping).
It seems more-or-less like an obscure bug to me at the moment. But maybe I'm missing something?

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

Re: Text flow upon copying affected by flattened objects underneath

Post by TrackerSupp-Daniel »

Hello, DIV

Thank you for this report, and sorry for how long it took to get back to you. I am unsure if you have seen this happen again in the latest version, but I cannot seem to get the issue to appear on my end, the text in both instances looks identical:
image.png
Following that you mention that when inspecting the individual blocks, there are extra breaks in the "affected" paragraph, but i cannot find that in your document at all, again, both paragraphs seem to be formatted the same way and appear identical:
image1.png
Perhaps this bug has been resolved in one of the releases between you reporting it and now, but I find it very strange that the document structure could have changed in any capacity, since I just downloaded a fresh copy today from your post.

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

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
DIV
User
Posts: 252
Joined: Fri Jun 23, 2017 1:47 am

Re: Text flow upon copying affected by flattened objects underneath  SOLVED

Post by DIV »

Hello, Daniel.

That is a head-scratcher.
I don't like to say so, but at the time I spent a couple of hours trying to figure the reported problem out, so it was definitely occurring back in mid-2021.

I too have just downloaded the originally attached file. Having opened that original file in Edge, copied the text, and pasted the text in Notepad, I found no difference. (As mentioned, the issue was not with the appearance, but with the underlying structure that would only become evident upon copying and pasting the text.)

I went back to five other files I had saved at the time (but not uploaded). None of them are exhibiting the problem any more when viewed in the latest(ish) version of PDF-XChange Editor (version 9.2 build 358.0, portable).

I agree that the structure of a saved file cannot change by itself. Which — to me — only leaves the possibility that an older version of Editor had a 'bug' causing it to incorrectly represent the structure somehow. And then I speculate that through your various updated versions the bug disappeared.

...Case closed :-)

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

Text flow upon copying affected by flattened objects underneath

Post by TrackerSupp-Daniel »

:)
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply