18 Replies Latest reply on Oct 16, 2012 9:02 AM by camicov

    Data Merge from external .rtf file

    camicov

      Hi!

       

      Well I've been searching for days to solve this... but I give up! I couldn't find anything on the web, so now I hope someone here can help me, I've been trying to call paragraphs in a variable data job from external .rtf files, something like when I call .jpg images using the file name and adding @ to the title inside the .csv database, I'm using ID CS6 and can't find the answer, is it possible?  if it is not possible is there some plugin that I can use to do that?  or a third-party solution?

       

      thanks in advance...

       

      Camilo

        • 1. Re: Data Merge from external .rtf file
          Peter Spier Most Valuable Participant (Moderator)

          Data Merge is primitive. It reads exactly two types of data files, .csv and comma-separated text (.txt), that you would typically export from a spreadsheet. It only works with image paths because they are marked as image paths and ID knows to read the path to place the actual image. Your .rtf files won't work.

          • 2. Re: Data Merge from external .rtf file
            Colin Flashman Adobe Community Professional

            @camicov

             

            that won't work unfortunately. the picture field is intended for pictures such as tif, jpg, eps, pdf... not text files. I have tried this before and no go.

             

            i figure that you're trying to have a data merge so if person A meets one condition, they get the paragraphs from RTF file A, whereas if person B meets a different condition, they get paragraphs from RTF B.

             

            a third party solution I have tried is XMPie which DOES do this but the price can be restrictive, depending how deep the wallet is.

             

            a workaround is to type the paragraphs into the spreadsheet... but the field can only contain one return (it sees the return as  the end of the field), so if there are many paragraphs in an entry, this will present issues.

             

            otherwise could try doing this with XML which can contain returns in the text, so long as it is within the same tagged text. trouble is the learning curve for XML is virtually a straight line up!

            • 3. Re: Data Merge from external .rtf file
              camicov Level 1

              Thanks Peter, that's what i was afraid of, so I'll look on a 3rd party solution.

              • 4. Re: Data Merge from external .rtf file
                camicov Level 1

                Thanks CDflash, I've look into XMpie and now I understand why you said it could be expensive.... and yes it is out of our budget, do you now any other solution?

                • 5. Re: Data Merge from external .rtf file
                  Colin Flashman Adobe Community Professional

                  perhaps try the list of third party plug-ins on the indesign portion of the adobe website: https://www.adobe.com/products/indesign/indepth.displayTab3.html... I think cacidi and emsoftware are the two which might have what you want.

                   

                  if the budget is $0, i'd revisit just what needs to be done and keep thinking of workarounds. my earlier post lists two, but i'm sure there are others. might help if you provide more details of the brief of this variable data job to see what we can suggest. variable data could be anything from a catalogue, mailing labels, direct mail pieces...

                   

                  colly

                  • 6. Re: Data Merge from external .rtf file
                    Colin Flashman Adobe Community Professional

                    Actually...

                     

                    I have thought of a rather brain-breaking way to use data merge to show or hide specific blocks of text based on a number value in the spreadsheet. it uses a combination of layers and GREP styles.

                     

                    Rather than explain it, I've made a PDF using exactly this method AND attached the indesign file plus the text file it references so posters can see what I've done: http://colecandoo.files.wordpress.com/2012/10/variableparas.pdf

                     

                    I probably wouldn't use it to create factsheets the way I did in the sample but I needed some copy to demonstrate the proof of principle.

                    • 7. Re: Data Merge from external .rtf file
                      Peter Spier Most Valuable Participant (Moderator)

                      That looks interesting, but I don't quite understand what you've done. It looks lke the text you are going to show/hide is already on the merge template, not in an external file. Is that right?

                      • 8. Re: Data Merge from external .rtf file
                        Colin Flashman Adobe Community Professional

                        Suppose I should have put some explanation rather than "work it out yourself"

                         

                        your assumption is correct, the show/hide text is on the merge template rather than an external database.

                         

                        in the indesign file, there is a base layer which contains the rudimentary variable data which will stay the same no matter what (population, area, country)...

                         

                        on all layers there is a text box which contains text relating to each country in a paragraph style which has no fill nor stroke, but has GREP styles which give the type a black fill.

                         

                        at the start of each paragraph are two underscores and then the variable data field for the country code. each text box has its own paragraph style which activates depending on the first three letters of the paragraph i.e. __2 activates paragraph 2 style, __5 activates paragraph 5 style etc. it's a lot easier to see the __<<number>> using the story editor.

                         

                        before tonight, i had put this in the "too hard" basket, but thought i'd give it a go and now that I have the proof of principle, can see LOTS of applications for this for VDP campaigns. for a campaign of a few hundred letters, this is over-engineering on a grand scale; but for thousands (and tens of thousands which I do deal with) then this provides a free alternative to what can be expensive third party software.

                         

                        When i've thought of a better way of demonstrating it, i'll write it up on my blog.

                         

                        colly

                        • 9. Re: Data Merge from external .rtf file
                          Peter Spier Most Valuable Participant (Moderator)

                          This really isn't quite the same thing, I suspect, as what the OP was after -- kind of unweildy with a long text file.

                           

                          Why not use Conditional Text to show/hide your paragraphs? Seems to me that would allow you to hide large chunks without leaving gaps.

                          • 10. Re: Data Merge from external .rtf file
                            Colin Flashman Adobe Community Professional

                            like i said, once i've thought of a better way of demonstrating it, i'll write it up.

                             

                            when doing data merges at work, I want ZERO post-processing time, so when I perform a data merge, I want to data merge straight to a PDF without having to generate a massive indesign file and then post process it, effectively double-handling. using my method does avoids post-processing, whereas using conditional text means that I would have to run the merge as many times as there are conditions, and then weed out the records that didn't had conditions which weren't necessary.

                            • 11. Re: Data Merge from external .rtf file
                              Peter Spier Most Valuable Participant (Moderator)

                              OK, I see your point, though I don't think you can handle dis-contiguous paragraphs from a single text file without some type of post processing.

                              • 12. Re: Data Merge from external .rtf file
                                Colin Flashman Adobe Community Professional

                                okay, i've written up what I've done. http://wp.me/p1x3Yg-7L hope this helps

                                 

                                colly

                                • 13. Re: Data Merge from external .rtf file
                                  Peter Spier Most Valuable Participant (Moderator)

                                  A slightly different twist on adding text in a merge. I do an annual directory for a the local antiques dealers association and it includes a description of each shop. There are about 200 members, and each one gets a different description. Using Colin's method would be unwieldy

                                   

                                  It's possible to have a field in the data source text file that contains a long block of text that can be merged. It just can't be linked from a second external file like an image. I'm still using Excel 2000 to store my dealer data, and it truncates at around 240 characters, I think, when it exports to text, but as far as I know you can manually type as much as you want into the data source. The big hangup is line breaks, if you need to force them. I've found it best to use a symbol of some sort to mark where they are, then use Find/Change to substitute the correct breaks, but that does require post processing.

                                  • 14. Re: Data Merge from external .rtf file
                                    Colin Flashman Adobe Community Professional

                                    agreed, I wouldn't use my method for a database where each entry had a unique block of text, such as a description etc. my method is only meant where a database has a choice of between 1-10 options to put the text in.

                                     

                                    a method which will preserve line breaks that is free and indesign does support without plug-ins is XML, but as said previously the learning curve is steep. the advantage is that the text block can be as many returns as you like; and all text will flow in the same text box.

                                     

                                    i'm only assuming that the OPs question was referring to perhaps 1-10 choices of text, rather than each block of text being unique to each record. had that been the case there's no way i'd contemplate the suggestion i created on my blog.

                                     

                                    nothing wrong with peter's option... i'd use the pipe symbols (these things --> |  ) whenever a return is required, because if hard/soft returns are put in the database, when exported to text or csv for use with indesign, the merge will fail.

                                     

                                    otherwise, my other answers would be XML or a third  party plug-in.

                                     

                                    however, the OP needs to add to this thread and explain exactly what needs to be done, because the initial post is open to several interpretations.

                                    • 15. Re: Data Merge from external .rtf file
                                      Peter Spier Most Valuable Participant (Moderator)

                                      This has been a very interesting discussion.

                                      • 16. Re: Data Merge from external .rtf file
                                        camicov Level 1

                                        Hi,

                                         

                                        Thanks both of you for your entusiassm, I'm sorry for the delay I've been away from these days, now let me clarify the problem putting the first lines on the database..

                                         

                                         

                                        CodigoNinoNombreNinoSaludoPatroTexto1Texto2Texto3Texto4ParticipacionTituloMSCMSC@FotoMSCEnlace
                                        167755-1066 Luis Alberto TUMI A THello My Dear Sponsor... MR. CHENG SHENG YEH167755-1066Educ1.rtf167755-1066Educ2.rtf167755-1066Salud1.rtf167755-1066Salud2.rtfI have partipated in the next processes carried out by the ADP: Making Christmas cards,Workshops.I also have received: School Fees,School Pack,Clothes for daily useLIFE STORY167755MSC.rtf167755-1066.jpg
                                        167755-1969 Mario Alberto YALANDA CHello My Dear Sponsor... MR. CHYUN LI LEE167755-1969Educ1.rtf167755-1969Educ2.rtf167755-1969Salud1.rtf167755-1969Salud2.rtfI have partipated in the next processes carried out by the ADP: Making Christmas cards,Workshops.I also have received: Clothes for daily useLIFE STORY167755MSC.rtf167755-1969.jpg
                                        167755-3054 Ever Humberto FERNANDEZ CHello My Dear Sponsor... MS. YI XUAN QI167755-3054Educ1.rtf167755-3054Salud1.rtf167755-3054Salud2.rtfI have partipated in the next processes carried out by the ADP: Making Christmas cards.I also have received: School FeesLIFE STORY167755MSC.rtf167755-3054.jpg
                                        167755-1066 Luis Alberto TUMI A THello My Dear Sponsor... MR. CHENG SHENG YEH167755-1066Educ1.rtf167755-1066Educ2.rtf167755-1066Salud1.rtf167755-1066Salud2.rtfI have partipated in the next processes carried out by the ADP: Making Christmas cards,Workshops.I also have received: School Fees,School Pack,Clothes for daily useLIFE STORY167755MSC.rtf167755-1066.jpg

                                         

                                         

                                        now as you can see there are different types of Variable info, and the main problem is calling those .rtf files that are inside the database....

                                         

                                        Do you know if I can make an xml or xls replace the  "file.rtf"  for the text inside that file?  

                                         

                                        best regards and I really appreciate what you are doing.

                                         

                                         

                                        btw, I've check the third party plugins from the adobe website and all of them are really expensive.. our budget would be something around  US150  as we thought ID would be enough for doing that.

                                        • 17. Re: Data Merge from external .rtf file
                                          Colin Flashman Adobe Community Professional

                                          no, XML references pictures via indesign much like data merge (jpg, tiff, eps) and won't bring in text... to my knowledge, but XML admittedly is not my forte.

                                           

                                          i'd still look for "low tech" options such as my workaround, but need to know:

                                           

                                          • how many records in the database
                                          • how many different text files being referred to (1-10 for example, or unique for all entries)
                                          • how many pages each record is going to be; and if text has to flow from page to page in each record.
                                          • how many lines are actually in the text files being referred to (is it a few paragraphs or is it pages and pages of text; does it need to retain the formatting...)

                                           

                                          the more i think about it, the more either a third party plug-in OR some form of post-merge processing has to occur.

                                          • 18. Re: Data Merge from external .rtf file
                                            camicov Level 1

                                            well,

                                             

                                            - the database is over 10.000 records

                                             

                                            - the text files are different for each entry.

                                             

                                            - all the records are in a single page

                                             

                                            - aprox. 20 lines separated on 5 paragraphs. example:

                                             

                                            (>10) Right now, my health is satisfactory.

                                            (>10) Through the program's healthcare project, children, our families and I have participated in:

                                            (SS6N) • Healthcare Promotion, which is comprised of information, training and education about hygienic habits, healthy diets and care for illnesses such as respiratory infections, diarrhea and other types of illnesses.

                                             

                                            (>10)  (SS6F)  • Preventive actions, carrying out vaccinations for children under five.

                                            • Dietary assessment for all children under 5 and those suffering malnutrition have been supported with food packs.

                                            (>10)  (SS6C)  • Guidance for our families and community via talks about adequate diets and managing home budgets to purchase nutritious foods and how these foods assist vital functions, such as growth, and improve health.

                                             

                                            and yes The format needs to be retained.