Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
10

GREP find/change combined with Data Merge

New Here ,
Feb 21, 2024 Feb 21, 2024

The attached InDesign file has a .CSV data merge source loaded.  The .CSV data includes a column of alphanumeric strings that have been encoded for use with the attached IDAutomation2D.ttf font.  My goal is to use the "Export PDF" command from the Data Merge pallete to export a merged 10,000 page PDF.  My issue is that the encoded data has a bunch of "_r_r" line break information, and those "_r_r"s are supposed to represent line break characters.  IDAutomation's solution for this is to use InDesign's Find/Change command and the GREP tab to replace all instances of "_r_r" with "~b~k".  And it works, but it only seems to work once and only on whichever single record from the data source that's being Previewed at the time.  For example, each record has 7 instances of the "_r_r" text.  So when I do the find/change command, I was hoping to get a "replaced 70,000 times" since there are 10,000 records in the data source.

 

Image 2-21-24 at 2.43 PM.jpgFIGURE 1:  First time Data Merge Preview is checked, you can see all of the "_r_r" line break info from the CSV source.

 

 

 

 

 

 

 

 

 

Image 2-21-24 at 2.45 PM.jpgFIGURE 2:  With Data Merge preview checked, I then do the Find/Change command.  14 Replacements made, which makes it seem like only the very first record's data was altered.

 

 

 

 

 

 

Image 2-21-24 at 2.46 PM.jpgAfter Find/Replace, it will preview accurately one time, then reverts back to showing the "_r_r" data.

 

 

 

 

 

 

 

 

 

 

Is it even possible for the Find/Change GREP function to do a find/change on the data source?  I know that I can create a "merged indesign document" which would then actually have all of the data flowed in.  Then I could use Find/Change in a more straightforward manner.  But the issue is there are 10,000 codes and I really just need to export straight to a merged PDF.

TOPICS
How to , Import and export , Scripting
628
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 21, 2024 Feb 21, 2024

Hi @MartinPrintingLLC-Brett, I've followed your question, and downloaded and tested you demo file—thanks for including!—and it seems you are trying to simplify your workflow from

1. Create Data Merge Document
2. FindGrep in whole document—find what: _r_r change to: \r
3. Export PDF

to

1. Export to PDF (from Data Merge Panel menu)

 or an equivalent 1-step process. Is that correct?

 

In any case, the first thing we need to get out of the way is, why don't you generate QRCodes with Indesign? DataMerge makes this incredibly easy. I added a hash character to the start of the field name "QR Code Data", then added a graphic frame on the page linked to the (new) qr code data field and I can use Export to PDF just fine.

 

Screenshot 2024-02-22 at 07.45.30.png

 

Screenshot 2024-02-22 at 07.49.51.png

Screenshot 2024-02-22 at 07.50.07.png

 

Of course, you may have some very good reason for not using this method, but we need to get this out of the way first off, before we can look at options (none of which will be anywhere near as simple).

- Mark.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 21, 2024 Feb 21, 2024
LATEST

Have you tried a text search instead: find  _r_r  and replace with  ^p I was able to find and replace the entire file without issue.

idfont.jpg

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines