RobC Posted February 12, 2022 Posted February 12, 2022 Hi - I'm working on a long document in Publisher with some URLs that go over 2-3 lines. Is there a way to find these URLs with Regex so I can manually insert a hyperlink to ensure they are detected in Acrobat? Thanks Quote
walt.farrell Posted February 12, 2022 Posted February 12, 2022 Welcome to the Serif Affinity forums. As far as I know there's no way to Find the text that spans multiple lines. There's nothing in the text string itself that shows where it flows onto the next line, and thus nothing for the reflex to find. I think you'll need to just look for http:// or https:// and examine each one. Ideally, I think you should put in a Publisher Hyperlink for each URL, whether it breaks across lines or not, rather than relying on Acrobat. After all, some users may not be using Acrobat, but a different PDF reader that is not configured to automatically detect URLs. 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.2.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
RobC Posted February 12, 2022 Author Posted February 12, 2022 Thanks Walt. I’m only just getting to grips with Regex but I was thinking along the lines of finding any new line that wasn’t preceded by a space or return. In theory this should find any broken strings of characters Rob PS I take your point about hyperlinking all URLs but it’s not an issue with my workflow as the PDF is uploaded to ISSUU to be read as an online flip book. Single line URLs are detected always Quote
walt.farrell Posted February 12, 2022 Posted February 12, 2022 33 minutes ago, RobC said: finding any new line that wasn’t preceded by a space or return There would need to be a physical new-line character of some kind in the text for that to work. 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.2.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
RobC Posted February 12, 2022 Author Posted February 12, 2022 That makes sense. Thanks for your help Quote
walt.farrell Posted February 12, 2022 Posted February 12, 2022 You're welcome. 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.2.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
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.