Editing a flattened text comment unintentionally inserts or removes whitespace at the wrapped part

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
User avatar
rakunavi
User
Posts: 898
Joined: Sat Sep 11, 2021 5:04 am

Editing a flattened text comment unintentionally inserts or removes whitespace at the wrapped part

Post by rakunavi »

Hello all,

I found that when editing a flattened comment written in Japanese, unintended whitespaces are inserted in the wrapped part of the original text. This issue is probably common to double-byte characters. I found this issue while creating the recent verification video.

  • https://forum.pdf-xchange.com/viewtopic.php?p=163255#p163255
Unintentional whitespace is inserted in the area circled in red<br />(Captured image from the video attached in the above topic)
Unintentional whitespace is inserted in the area circled in red
(Captured image from the video attached in the above topic)

I have captured screen of verification process for your reference, please see the attached video for details.

The reproduction procedure is as follows. The corresponding timecode in the video is also included. ([MM:SS] "MM" shows minutes, and "SS" shows seconds.)

  • Step 1 [00:03] Create a text box comment and enter Japanese text across multiple lines. It is easier to check the issue if you do not include whitespaces or punctuation.
  • Step 2 [00:17] After copying the comment, flatten it.
  • Step 3 [00:31] Enable content edit mode and insert a whitespace in the first comment. So far, it is working fine.
  • Step 4 [00:36] If you insert whitespace in the same way for the second and subsequent comments, unintended whitespaces are inserted in the wrapped part of the original text.
  • Step 5 [00:45] Save the file, close the application, and reopen the file.
  • Step 6 [00:56] Enable content edit mode and insert a whitespace in the first comment again, and unintentional whitespaces will be inserted in the wrapped part of the original text as before.
The issue can be summarized in the following two points:
  • Unintended whitespaces are inserted in Step 4.
  • The behavior changes between Step 3 and Step 6 despite the same operation.
Unintentional whitespace is inserted in the area circled in red<br />(Captured image from the verification video)
Unintentional whitespace is inserted in the area circled in red
(Captured image from the verification video)

Up to this point, I have written this assuming double-byte characters, but if you perform a similar operation on a single-byte character of the alphabet, the whitespace in the wrapped part will be removed. For example, in the verification above, "漢字" is copied continuously in the text box, but try to copy "WORD " that includes a whitespace at the end instead. After the operation in Step 4, the word wrapped part should become "WORDWORD". Unlike in the Japanese case, the issue starts with the first flattened comment. That is, Step 3 described above does not exist. I have also captured screen of verification process, please see the attached video for details.

Whitespace has been unintentionally removed in the area circled in red
Whitespace has been unintentionally removed in the area circled in red

Therefore, I have chosen a title of this topic that does not limit the content of the issue to double-byte characters.

  • Editing a flattened text comment unintentionally inserts or removes whitespace at the wrapped part
Hoping that the above information will be of some help to you.
Thank you so much for your continued support.

Best regards,
rakunavi

- PDF-XChange Editor Plus Version:9.4 build 363.0
- OS Version: Windows 10 Home/Pro 21H2 Build 19044.2006
- PC Model: Lenovo IdeaPad C340-15IWL / HP ProDesk 600G1
TOP desires for PDFXCE
forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
forum.pdf-xchange.com/viewtopic.php?t=37353 FulScrMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6897
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Editing a flattened text comment unintentionally inserts or removes whitespace at the wrapped part

Post by Paul - Tracker Supp »

Again, our thanks Rakunavi for the detailed explanation.

I personally find the methodical approach you have very helpful in both understanding the issue and reproducing it, so thanks again for the effort you put into this, it really is appreciated.

The dev team are looking into this and if they request it I will be raising a ticket. Right now we are just waiting to hear back from them.

regards
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
User avatar
rakunavi
User
Posts: 898
Joined: Sat Sep 11, 2021 5:04 am

Re: Editing a flattened text comment unintentionally inserts or removes whitespace at the wrapped part

Post by rakunavi »

Hi Paul,

Thank you for taking the time to look into this in detail.

I mentioned that the whitespace was removed in the English case, but when I selected the text and pasted it into notepad via clipboard, the whitespace was present. When I enlarged the PDF and looked closely, the whitespace itself was present, although the character spacing was indeed reduced.

Although very narrow, there is a whitespace where the light blue vertical line exists.
Although very narrow, there is a whitespace where the light blue vertical line exists.

Comments and flattened comments look almost the same at the user level. However, it is easy to imagine that once they are flattened, their internal structure changes dramatically, making them more difficult to handle. In addition, as previously mentioned in the following topic, Japanese, along with Chinese and Thai, is a language that does not include spaces between words, which undoubtedly makes the process even more complicated when this is taken into account.

  • Searching for words and phrases that span lines
    https://forum.pdf-xchange.com/viewtopic.php?p=162565
I may be requesting the impossible in the first place. Regardless of the developer's decision, I respect your willingness to try to solve the issue. An engineer who can understand the PDF file format is like a god to me. :o

Best regards,
rakunavi
TOP desires for PDFXCE
forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
forum.pdf-xchange.com/viewtopic.php?t=37353 FulScrMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6897
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Editing a flattened text comment unintentionally inserts or removes whitespace at the wrapped part

Post by Paul - Tracker Supp »

He he, well while we have some gods here I am not one of them!

I was told by one of these gods that we do need to look into the space that gets added, and the double bit and single bit languages are not being handled the same way.

I suspect this will be covered by RT#6234: Double bit character style inconsistencies I have referenced this on the ticket. If a separate ticket is required I'll do so and post here.

Enjoy the weekend!
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
User avatar
rakunavi
User
Posts: 898
Joined: Sat Sep 11, 2021 5:04 am

Re: Editing a flattened text comment unintentionally inserts or removes whitespace at the wrapped part

Post by rakunavi »

Thank you, Paul, for creating the ticket!
It is very reassuring to have someone on the Tracker team who understands Japanese language.

Best regards,
rakunavi
TOP desires for PDFXCE
forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
forum.pdf-xchange.com/viewtopic.php?t=37353 FulScrMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6897
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Editing a flattened text comment unintentionally inserts or removes whitespace at the wrapped part

Post by Paul - Tracker Supp »

My pleasure sir!

You honour me more than my skills deserve and I am grateful. After 20 years not using it I am surprised I can help at all. I think need a reverse of the classic "conversation school"... ;-)
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Post Reply