latimeriasdream Posted August 5, 2023 Share Posted August 5, 2023 When increasing the letter spacing of a text in publisher and then exporting to PDF if you copy - paste the text it will have extra spaces meaning if it is a link you copied it will not work unless you remove every space. Is there a way to work around this so i can maintain the visual aspect of the letter spacing while still having it copy with single spacing? Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted August 5, 2023 Share Posted August 5, 2023 What application are you Opening the PDF file in, and then doing the Copy/Paste of your text? (And, out of curiosity, why Copy/Paste instead of just clicking on the link?) Can you provide a sample .afpub file and the exported PDF? Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1 Link to comment Share on other sites More sharing options...
latimeriasdream Posted August 5, 2023 Author Share Posted August 5, 2023 @walt.farrell Im opening in browser both Edge and Chrome and getting the same result, i had assumed this was a result of the PDF export from publisher not a viewer functionality? And because not all PDF viewers support hyperlinks i was hoping to just have plain text. test.pdf test.afpub walt.farrell 1 Quote Link to comment Share on other sites More sharing options...
Oufti Posted August 6, 2023 Share Posted August 6, 2023 Effectively, copying and pasting in a text editor from different PDF viewers (and also from the original file) resulted in various results: What seems strange to me is that Adobe Acrobat should be the most respectful of PDF standard. But here, there is clearly an unwanted behaviour… (I also re-exported a PDF from your .afpub file and it behaves the same way.) BTW, @latimeriasdream, in your .afpub test file I didn't see any character spacing in the Position and transform fields, beside the automatic kerning between "Te"? What am I missing? Quote Affinity Suite 2.5 – Monterey 12.7.5 – MacBookPro 14" 2021 M1 Pro 16Go/1To I apologise for any approximations in my English. It is not my mother tongue. Link to comment Share on other sites More sharing options...
latimeriasdream Posted August 7, 2023 Author Share Posted August 7, 2023 @Outfi Thanks for doing some testing, i dont have access to apple preview and was concerned how it would look there. I am using Paragraph > Justification > Desired Letter Spacing. I dont know much about PDF but it seems like there is some data in the PDF that lets some apps like acrobat know there is extra spacing whereas other apps cannot read this data and thus you get no spacing when copy pasting? If only there is some way to change this on export or maybe a 3rd party app. Oufti 1 Quote Link to comment Share on other sites More sharing options...
MikeW Posted August 7, 2023 Share Posted August 7, 2023 The issue lies with either the pdf library Serif uses or how it is used. There is a "phantom space" between all but the /Te/ characters as shown in @Oufti screen shots. It is written in the pdf. Here's a screenshot that likely will not mean much to anyone. On the left-hand pane, GID: 0 is the culprit. Technically, this invisible glyph is displayed by its bounding box dimensions--the box in the middle of the screen. The small dialog on the right shows this glyph as <0000> <FFFF> and uses a separate encoding to the viewable characters. The viewable characters, Testing, are highlighted in the red box at the bottom left. Anyway, none of the other 3 layout applications display this behavior. In fact, I also placed the OP's pdf into each layout application along with my own test strings and all 3 applications corrected the issue in the OP's pdf. Oufti 1 Quote Link to comment Share on other sites More sharing options...
latimeriasdream Posted August 7, 2023 Author Share Posted August 7, 2023 I see this is beneficial to look at, so i will need some post-export intervention if i want to remove this completely since it appears this is not an option withing publisher itself. If this is the case are there any recommended workflows or tools for this? Quote Link to comment Share on other sites More sharing options...
MikeW Posted August 7, 2023 Share Posted August 7, 2023 44 minutes ago, latimeriasdream said: ... are there any recommended workflows or tools for this? Short of using a different layout application? Dunno. I haven't tried seeing if Acrobat or pdfToolbox can re-export such a pdf and have it fix your sample. But even if it did, it would take much more testing to say with any degree of confidence they can repair all Affinity generated pdfs. If someone else hasn't tried, I'll try in the morning. The computer has been turned off for the night. Oufti 1 Quote Link to comment Share on other sites More sharing options...
MikeW Posted August 8, 2023 Share Posted August 8, 2023 Sorry for the delay. I couldn't figure out a means to actually remove the offending space characters using Acrobat or pdfToolbox. The only way I found was placing the pdf in ID or QXP and generating a new pdf. Quote Link to comment Share on other sites More sharing options...
kenmcd Posted August 8, 2023 Share Posted August 8, 2023 On 8/5/2023 at 3:29 PM, latimeriasdream said: Is there a way to work around this so i can maintain the visual aspect of the letter spacing while still having it copy with single spacing? Probably not. All PDF readers/editors are guessing about spaces when copying text (or editing text). There is no text "run" in a PDF. It is a bunch of characters in boxes placed at coordinates on the page. (you can see these coordinates in MikeW's image above in the lower left column). Adjustments to tracking or justification make this guessing-the-spaces harder. The image below is your PDF with your character spacing on the first line, and I added a second line where I removed the Desired Letter Spacing adjustment. The blue boxes are the Approximate Text Bounds for the various characters. The empty box is an actual space character (new in v2.1). That variable white space is what confuses the PDF readers/editors. Some PDF readers/editors are better than others at guessing the correct real spaces. As an example of this note the differences in Oufti's post above. You will get different results in many different PDF readers/editors. APub v2.1 made the guessing easier by adding actual space characters now (before this "spaces" were just additional white space which made the guessing actual real spaces that much harder). Some PDF readers/editors, being aware of these problems, enable the user to affect how the guessing is done - for example below is a Preferences setting in PDF-XChange Editor (this is for editing): You cannot control what PDF reader the user is going to use. What you can control is the letter spacing. Do not use tracking or spacing adjustments. Then the PDF reader has a much better chance of guessing actual spaces correctly. If you are trying to affect the readability of small text by adding letter spacing, use a better font which provides the correct optical size instead. If you simply like "the look" - you are SOL. Oufti 1 Quote Link to comment Share on other sites More sharing options...
thomaso Posted August 8, 2023 Share Posted August 8, 2023 1 hour ago, kenmcd said: On 8/6/2023 at 12:29 AM, latimeriasdream said: Is there a way to work around this so i can maintain the visual aspect of the letter spacing while still having it copy with single spacing? Probably not. All PDF readers/editors are guessing about spaces when copying text (or editing text). FWIW, in Acrobat I get two different results with copy/paste within the test.PDF depending on the used Acrobat tool: (the first is tooltipped like "Select Text and Images", the second says "Edit original document text".) PDF text & spaces.m4v Oufti and kenmcd 2 Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 Link to comment Share on other sites More sharing options...
latimeriasdream Posted August 9, 2023 Author Share Posted August 9, 2023 Thank you all for the time you have spent on this, I was not expecting such great information and it has been very educational and i now understand the path i should take! kenmcd 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.