Amontillado Posted January 17, 2023 Share Posted January 17, 2023 I haven't been able to find an answer for this. In version 1, I could create a CSV file with line breaks to print envelopes with Affinity Publisher (fly, meet sledgehammer). In version 2, or maybe with an option flipped, the merge data follows word wrapping. Instead of three lines in the address, I get one, word-wrapped inside the text box as if the merge data didn't include line breaks. Is there an option to change how line breaks are processed in merge data? Many thanks in advance. Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted January 17, 2023 Share Posted January 17, 2023 There is something odd going on here, in both Publisher and Publisher 2, so I suspect they fixed a V1 bug in V2, but maybe the fix broke something else. Here's a screenshot of a record preview from V1. Note that in the Fields panel we see that the record has a multi-line Address field. Yet in the document page, we see only the first line. That seems wrong, to me. Here's the same preview but in V2. Note that we see all 3 lines of the address. However, we see paragraph breaks between the lines, not line feeds: So, we now see the complete preview in V2, so that's one bug fixed. But what should have been line breaks in the preview are paragraph breaks. That seems like a bug. And what is finally generated when we run the Merge is this, which has neither the expected line breaks nor paragraph breaks: Note that it also lost the comma after Anywhere. (Yes, I know this is a CSV file, but the multi-line address field is quoted (" surrounding it) which should "escape" the comma, and we can see in the preview and in the Fields panel that it did.) So that's another bug. Here's the CSV file, for others who want to work with this: Untitled 1.csv 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...
laurent32 Posted January 18, 2023 Share Posted January 18, 2023 Multilines fields in csv file is a big subject… Generally, in csv files, CR LF is used for end of line… Comma is the field separator… "" are used to delimit fields… and so there is confusion when it comes to multiline fields… To deal with those multilines fields, Filemaker, for example, use the VT code ( = 0B = vertical tabulation)… I feel your document Untitled 1.csv is strangely built, data isn't displayed in columns… like a classical csv file… You have a 0D 0A (hex) after Address, 0D 0A (hex) after Address2, 0A after ["My street], 0A after [Apt 23], and 0D 0A after [Anywhere, USA"]. Where 0A = LF = line feed ; 0D 0A = CR LF = carriage return + line feed. Because you have only one record in your file I don't know what code you would use as a line separator ? LF and CR are already used inside the record itself… Here is the csv file with comma separated values, LF for multiline field, and CR LF as end of line : Untitled2.csv Note : CR LF as end of line is generally on Windows system ; LF as end of line is generally on macOS system (or Unix). Concerning Affinity, I wonder what code is used to work with multiline fields ? LF (could be a problem for Mac files) ? VT ? Other ? I also wonder if "" are used as field delimiters because there's the problem with the comma that disappeared as Walt noted… Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
walt.farrell Posted January 18, 2023 Share Posted January 18, 2023 1 hour ago, laurent32 said: I feel your document Untitled 1.csv is strangely built, data isn't displayed in columns… like a classical csv file… It has only 1 column. Thanks for pointing out the 0D/0A issue. I had missed that. 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...
laurent32 Posted January 18, 2023 Share Posted January 18, 2023 2 hours ago, walt.farrell said: It has only 1 column I think it should be one row ? Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
walt.farrell Posted January 18, 2023 Share Posted January 18, 2023 1 hour ago, laurent32 said: I think it should be one row ? I think it has 2 rows, one column each. But that might have been an earlier version. My point was that the data is displayed in columns, but there's only one of them. 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...
Seikilos Posted June 4, 2023 Share Posted June 4, 2023 Just to follow up: The behaviour is not fixed, right? Because in latest Apub 2 the behaviour, that @walt.farrell mentioned, is still there. Newlines in the merged output seem to be filtered Quote Affinity User on Windows 11 Link to comment Share on other sites More sharing options...
walt.farrell Posted June 4, 2023 Share Posted June 4, 2023 Serif have not updated either of the topics that has a bug tag for this to mark them as fixed, so it probably isn't: https://forum.affinity.serif.com/index.php?/search/&tags=AFB-7327 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...
Amontillado Posted June 4, 2023 Author Share Posted June 4, 2023 (edited) This has not been fixed, but there is a reasonably easy workaround. Open your csv file in a spreadsheet app. Replace every occurrence of newline with something recognizable. I like ¶. Merge the data into Affinity. In Affinity, replace every occurrence of ¶ with newline. Note that in the Affinity replace field, newlines appear as ¶ characters. No biggie, it works. For more of a one-click-fix for the csv file, use BBEdit on Mac with a saved text factory (like a macro) to make the change. On either Windows or Mac, the extremely wonderful Easy Data Transform can save transformations. Load a csv file, apply the pilcrow transform, and save it. I don't have anything to do with Easy Data Transform. If you do much with merge data you may find it a good companion for other reasons. For instance, say you've got customer data including name and address in an Excel file, a csv export from your accounting system showing a log of individual sales, and a JSON dump from a tracking system that relates customers to industrial categorizations. EDT can do joins across different source formats. You could extract the customers from the Excel file with sales totals in the csv file beyond some threshold that appear in targeted industries in the JSON dump, writing your distilled data to csv (or any of several formats). Good luck with your merges! Edited June 4, 2023 by Amontillado Forgot a detail. Seikilos 1 Quote Link to comment Share on other sites More sharing options...
Seikilos Posted June 4, 2023 Share Posted June 4, 2023 3 hours ago, Amontillado said: This has not been fixed, but there is a reasonably easy workaround. Open your csv file in a spreadsheet app. Replace every occurrence of newline with something recognizable. I like ¶. Merge the data into Affinity. In Affinity, replace every occurrence of ¶ with newline. Note that in the Affinity replace field, newlines appear as ¶ characters. No biggie, it works. For more of a one-click-fix for the csv file, use BBEdit on Mac with a saved text factory (like a macro) to make the change. On either Windows or Mac, the extremely wonderful Easy Data Transform can save transformations. Load a csv file, apply the pilcrow transform, and save it. I don't have anything to do with Easy Data Transform. If you do much with merge data you may find it a good companion for other reasons. For instance, say you've got customer data including name and address in an Excel file, a csv export from your accounting system showing a log of individual sales, and a JSON dump from a tracking system that relates customers to industrial categorizations. EDT can do joins across different source formats. You could extract the customers from the Excel file with sales totals in the csv file beyond some threshold that appear in targeted industries in the JSON dump, writing your distilled data to csv (or any of several formats). Good luck with your merges! Nice hint. Haven't thought about replacing placeholders afterwords. Makes it a little annoying to use but would be a valid solution indeed. Thanks for the idea! 👍 Quote Affinity User on Windows 11 Link to comment Share on other sites More sharing options...
affineuser Posted December 18, 2023 Share Posted December 18, 2023 Just to bump the issue: I just tried the Data Merge functionality in Publisher 2 - which I really like - and stumbled upon the same issue in 2.3.0. Linebreaks within fields are converted to spaces. Has Serif some sort of upvoting a feature request or bug? Quote Link to comment Share on other sites More sharing options...
Dan C Posted January 2 Share Posted January 2 Thanks for letting us know @affineuser & apologies for the delayed response over the holidays. On 12/18/2023 at 1:46 PM, affineuser said: Has Serif some sort of upvoting a feature request or bug? I can confirm that I have 'bumped' this issue with our development team using your report, to bring it to their attention once again. I hope this helps mondze, affineuser and PublicBenemy 3 Quote Link to comment Share on other sites More sharing options...
PublicBenemy Posted January 28 Share Posted January 28 (edited) On 1/2/2024 at 10:29 AM, Dan C said: […] I can confirm that I have 'bumped' this issue with our development team using your report, to bring it to their attention once again. […] Highly appreciated, thank you very much! While at it, maybe you can also have a look at this issue. I have an excel file with a date column and a text column A4 is the value of "04.03.2024", displayed as custom date format TTTT, T. MMMM JJJJ B4 is the formula =TEXT(A4;"TTTT T. MMMM JJJJ") In my Publisher 2 document, I put in both place holders The two columns behave differently. For the first one, there is a "/" character instead of the "." character. The second column is displayed correctly. It's a German excel version of Office 365. Edited January 28 by PublicBenemy Quote Link to comment Share on other sites More sharing options...
Komatös Posted January 28 Share Posted January 28 1 hour ago, PublicBenemy said: While at it, maybe you can also have a look at this issue. I have an excel file with a date column and a text column Hallo und willkommen im Forum. Kannst Du uns bitte die Excel-Datei bereitstellen, damit wir schauen können, wo der Fehler sein kann? Quote MAC mini M4 | MacOS Sequoia 15.1.1 | 16 GB RAM | 256 GB SSD AMD Ryzen 7 5700X | INTEL Arc A770 LE 16 GB | 32 GB DDR4 3200MHz | Windows 11 Pro 24H2 (26100.2161) Affinity Suite V 2.5.6 & Beta 2.6 (latest) Interested in a free (selfhosted) PDF Solution? Have a look at Stirling PDF Ferengi Acquisition Rule No. 49: “A deal is a deal is a deal.” Link to comment Share on other sites More sharing options...
PublicBenemy Posted January 29 Share Posted January 29 22 hours ago, Komatös said: Kannst Du uns bitte die Excel-Datei bereitstellen, damit wir schauen können, wo der Fehler sein kann? Ich versuch sie mal hier reinzuhängen, ich hoffe, es klappt. Speisenliste_4Serif.xlsx Quote Link to comment Share on other sites More sharing options...
Komatös Posted January 29 Share Posted January 29 42 minutes ago, PublicBenemy said: ich hoffe, es klappt. Hat funktioniert. Es ist der Punkt, der von Publisher falsch ausgelesen wird. Warum auch immer. Nutze als alternatives Zellenformat nachfolgende Formatierunsvorlage [$-de-DE]TTTT T. MMMM JJJJ @Dan C FYI It is the full stop that Publisher reads incorrectly from the Excel spreadsheet. Dan C and PublicBenemy 2 Quote MAC mini M4 | MacOS Sequoia 15.1.1 | 16 GB RAM | 256 GB SSD AMD Ryzen 7 5700X | INTEL Arc A770 LE 16 GB | 32 GB DDR4 3200MHz | Windows 11 Pro 24H2 (26100.2161) Affinity Suite V 2.5.6 & Beta 2.6 (latest) Interested in a free (selfhosted) PDF Solution? Have a look at Stirling PDF Ferengi Acquisition Rule No. 49: “A deal is a deal is a deal.” Link to comment Share on other sites More sharing options...
PublicBenemy Posted January 30 Share Posted January 30 13 hours ago, Komatös said: [$-de-DE]TTTT T. MMMM JJJJ Works like a charm! Danke! Komatös 1 Quote Link to comment Share on other sites More sharing options...
mondze Posted July 5 Share Posted July 5 Update: Have the same issue, Publisher 2.5.3 no breaks implanted Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted July 5 Share Posted July 5 42 minutes ago, mondze said: Update: Have the same issue, Publisher 2.5.3 no breaks implanted As the Affinity Info Bot has not posted to say the issue is fixed, that's not surprising. 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...
spicemerchant Posted August 28 Share Posted August 28 Just want to confirm our deep need for this feature. It did not occur to me that newlines would not be handled well... I should've tested, but we've now got packaging labels designed in Publisher 2 and there are a lot of line breaks we need to deal with. The find/replace of a special character, seems to work, but boy does it make me nervous, and adds a step which can lead to error. Quote Link to comment Share on other sites More sharing options...
Mahlon Stacy Posted October 1 Share Posted October 1 I need this fixed, too. I have a 36 page program that has many merged entries with line breaks. Quote Link to comment Share on other sites More sharing options...
Staff Callum Posted October 6 Staff Share Posted October 6 On 10/1/2024 at 1:18 PM, Mahlon Stacy said: I need this fixed, too. I have a 36 page program that has many merged entries with line breaks. Hi Mahlon Stacy welcome to the forums, This is something that is still being looked into by our dev team it should be fixed in one of our future updates, I apologise for any inconvenience in the meantime. Thanks C Quote Please tag me using @ in your reply so I can be sure to respond ASAP. 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.