These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

creating a CSV file when splitting a PDF

LAS60
Registered: Sep 29 2011
Posts: 3

We have large statement files with up to 10,000 bookmarked accounts. we can split them using Acrobat X Pro but we need a corresponding CSV file to use as an index file to process the pdfs into a data base. How do we create the CSV file?

LAS

My Product Information:
Acrobat, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Are you splitting using a script or with the new "Split" tool on the Pages Panel in Acrobat X?

The only way to create a custom CSV file is to write a script. If you're already using a script to do the splitting then this is just addition. But if you are not using a script you'll need to write one to analyze the doc and produce the CSV you need.

The general method is to create a string variable to hold the raw CSV Text data as the document is being analyzed, then at the end of the analysis process write the string into an attachment on the file.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

LAS60
Registered: Sep 29 2011
Posts: 3
Thanks for the response. We are using the Split tool. We were told by a sales rep that X Pro would create a CSV. But not that we would need to write a script to do it. Are there canned scripts available that we could modify to pull out the fields we need? I watched your getting started tutorial and on the trial version of X pro we have I don't have an Advanced tab. Are you aware of any other products that will do what we need without writing scripts? Thanks again.

LAS

try67
Expert
Registered: Oct 30 2008
Posts: 2398
Do you mean a CSV file of the bookmarks structure? If so, then you can use this script (the text version), created by me: http://try67.blogspot.com/2008/11/acrobat-export-bookmarks-to-pdf-txt.php
If you need the output to have a specific format, I can adjust it for you.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

LAS60
Registered: Sep 29 2011
Posts: 3
What we really need is an XML file in a specific format (which includes the bookmarks as index values) to load the split PDF files into a database. We have a program that will read a CSV file and build the XML file. We need Acrobat to build the CSV. The CSV file needs to contain the bookmark values and the name of each split file.
The following would be an example of the CSV record from the bookmark IXO^999999999^_^06/24/2011^test account.
"FileName","VAR_APP","VAR_ACCT","VAR_RMACCOUNT","VAR_END_DATE","VAR_NAME_PRI"

"IXO_9999999999_000000.pdf","IXO","9999999999","_","06/24/2011","test account"




LAS

try67
Expert
Registered: Oct 30 2008
Posts: 2398
Yeah, that's possible. Send me an email (the address is in my signature) and we could discuss it further.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com