Friday, July 27, 2018

Splitting PDF Files to Variable File Names

Splitting PDF Files to Variable File Names


When performing a Data Merge in Adobe InDesign, a multi-page InDesign file or multi-page PDF is generated. For some print processing workflows, the multi-page PDF may need to be split into single pages. One could use Acrobat Pro to split the PDF document into single pages (Tools/Pages/Split Document). Another approach could be to export single page PDF files directly from the multi-page InDesign file, using the free �PEU� script (Page Exporter Utility).

Both of these methods generally result in each separate PDF file using the original �base� filename with a delimiter and a variable prefix or suffix. This may be fine for some workflows, however some users may wish to use a dynamic file name for each separate PDF. For example, a unique file name could be based off variable document content such as a headline, a person�s name, product description or part code etc.

Variable document naming can be automated by making use of a feature known as (PDF) Tags. Tags are simply �metadata� describing structural content within a PDF file. Tags are most commonly used for the visually impaired via screen reader software and other accessibility orientated tools, however their benefits don�t stop there.

Tags can also benefit PDF files that are solely intended for print production. Unfortunately, print standards such as PDF/X don�t include PDF Tags, which will need to be enabled if using an unmodified PDF/X export preset (the presence of PDF Tags does not invalidate a PDF/X standard, however they may slightly increase file size). In the case of this article, PDF Tags generated by InDesign are leveraged to create variable file names within Acrobat Pro when splitting a multi-page document to single page files.

Automatically naming files based on content reduces manual touch points and removes human error when naming multiple files destined for output. Having an appropriately named file may also be of benefit to file system automation software, which can route the file based on the file name to an appropriate hot folder for automated print processing. For example, the file name may include a specific quantity value which is then used by file system automation software to move the file to a RIP hot folder that is setup to output a set number of copies.


Step 1A - Manually applying �Tags� to a variable object in InDesign:

The obvious and direct method is to apply the required PDF Tag to the object in InDesign (Window/Utilities/Tags). Another similar direct method is to apply the required PDF Bookmark to the object in InDesign (Window/Interactive/Bookmarks).

Step 1B - Exporting a �Tagged� PDF from InDesign:

If a text object uses a unique paragraph style, then the PDF can be exported from InDesign with the �Create Tagged PDF� checkbox enabled.

Open the PDF in Acrobat Pro. In the Bookmarks panel, delete any existing Bookmarks. Next access the Bookmarks panel options gear icon and select the �New Bookmark from Structure�� option. Highlight the desired InDesign paragraph style name and press OK. A new parent �Top-Level Bookmark� is created.

Expand the top-level bookmark and highlight all of the child bookmarks contained therein. Drag these child bookmarks out of the parent top-level bookmark, so that they become individual top-level bookmarks. Finally, delete the original (now empty) parent top-level bookmark.

Step 2 � Splitting the PDF based on the Bookmark Names:

Next use the Tools/Pages/Split Document command. Select the �Top-Level Bookmarks� option, rather than the more familiar number of pages option. Press the �Output Options� button and select the �Use bookmark names for file names� option and press OK. Finally, press OK to split the document into separate files based on the top-level bookmark names.


Adding Tags to an Un-Tagged PDF:

Not all PDF files contain structure tags. Tags can be added to a PDF file using Acrobat Pro in various ways. One method uses the Tools/Accessibility/Add Tags to Document command. Another method involves using the Tags sidebar/Add Tags to Document command. A third approach uses the Action Wizard/Create Accessible PDFs command. Once the PDF has structural tags, new top level bookmarks are created from the tagged document structure. Finally, the Split Pages using Top Level Bookmarks command can be used.


There are a number of third-party PDF options to explore:

http://www.boxoft.com/pdf-renamer/
https://www.evermap.com/autosplit.asp
http://www.a-pdf.com/content-splitter/
http://www.verypdf.com/app/pdf-content-splitter/index.html
http://www.a-pdftools.com/pdf-rename/


Read more over at InDesignSecrets.com:

http://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php
http://indesignsecrets.com/data-merging-individual-records-separate-pdfs-part-2-scripting.php


Read more at Colecandoo.com:

http://colecandoo.com/2013/07/13/breaking-up-is-hard-to-do-indesign-files-into-individual-pdfs-that-is/


Multi-page PDF files can also be split into single pages from a .CSV source file using an Acrobat Pro JavaScript:

http://prepression.blogspot.com.au/2015/07/Splitting-PDF-File-Names-From-CSV.html


More information on PDF Tags can be found in the following links:

https://helpx.adobe.com/indesign/using/structuring-pdfs.html
http://www.planetpdf.com/enterprise/article.asp?ContentID=what_is_tagged_pdf_
https://acrobatusers.com/tutorials/what-are-pdf-tags-and-why-should-i-care
http://www.pdfa.org/2011/10/the-value-of-tagged-pdf/


Addendum � Combining PDF files using Acrobat Pro:

Multiple PDF files may be combined into a single PDF to facilitate editing using a single file, however the combined files may still need to be split back to their original files after editing. Combining separate PDF files in Acrobat Pro using the Create/Combine Files into a Single PDF command will create Top Level Bookmarks, which can then be used to Split to individual file names. Multiple page PDF files are correctly handled as the Top Level Bookmarks are applied to each page ensuring that all pages are contained in the split.



visit link download