Exporting and Importing PDF Links To/From Text Files

AutoBookmark plug-in for Adobe® Acrobat®

Introduction
This tutorial shows how to export PDF links into a text file, edit it in a text editor and import it back into the same PDF using the AutoBookmark™ plug-in for the Adobe® Acrobat®.
The link import/export functionality can be effectively used to compile links from multiple sources into a single PDF file. This functionality comes handy when a team of users is working on the same PDF document.
This operation is also available in Action Wizard (Acrobat's batch processing tool) and can be used for automating of document processing workflows.
Prerequisites
You need a copy of the Adobe® Acrobat® along with the the AutoBookmark™ plug-in installed on your computer in order to use this tutorial. You can download trial versions of both the Adobe® Acrobat® and the AutoBookmark™ plug-in.
Stage - 1 Exporting Links
The existing PDF links from one or more pages of the document can be exported into a comma-delimited text file (spreadsheet-ready CSV format).
Step 1 - Open a PDF File
Start the Adobe® Acrobat® application and open a PDF file that contains links using “File > Open…”.
Step 2 - Open "Export To Text" Dialog
Select "Plug-Ins > Links > Export To Text..." from the menu to open "Export To Text" dialog.
Step 3 - Specify Exporting Links Settings
Press the "Browse..." button to select an output file name and location. Alternatively, check an option for creating an output file name based on input document name. The last option is useful in batch processing mode, because it allows automatic exporting document-specific files that can be later automatically re-imported based on the filename convention. For example, if input document is named "Report.pdf", then links will be exported into "Report.pdf.links.txt" file. Optionally, click "Edit Page Range..." button to select a working page range. Only links from the selected page range will be exported. Click "OK" to start exporting.
The dialog will show the total number of links exported. Click "OK" to open output text file in the text editor (Notepad) or press "Cancel" to finish.
Stage 2 - Editing Text
Links can be edited and imported back into the same or different PDF document. For example, it can be used to change target file names, named destinations, web links or page numbers. Edit link attributes using any plain text editor such as Notepad.
Step 1 - Open Text File
Open the output text file if it hasn`t been opened at the previous step.
Step 2 - Edit Text File
Edit links annotations as required. Note that each link is exported on a separate text line. Link location, dimensions, appearance and corresponding action are exported. Click here for a description of the export file format. Please consult AutoBookmark help documentation for details and up-to-date information. You can access help documentation via any Help button or via Help > Plug-in Help > AutoBookmark menu in Adobe Acrobat.
Step 3 - Save Text File
Save the file by using "File > Save" menu in the Notepad editor.
Stage 3 - Importing Links
The output text file can be imported back after editing into the same or another PDF document.
Step 1 - Open the PDF File
Open in the Adobe® Acrobat® application the same PDF file that was used for exporting links. Alternatively, open a document you want to add link annotations to.
Step 2 - Delete Existing Link Annotations
No new link annotation will be created if there is already another link that covers the same page area. If you are planning to re-import links into the same PDF document or into a document that already has annotations, then make sure you either delete existing annotations or verify that new link annotations are not going to overlap existing ones.
Select "Plug-ins > Links > Delete Links..." to delete the existing links.
The "Delete Links" dialog will appear. By default, it will delete links from all pages. Specify a different working page range if this is not desired. Click "OK" to delete links.
The dialog will show the total number of links deleted. Click "OK".
Step 3 - Open "Import From Text" Dialog
Select "Plug-ins > Links > Import From Text..." from the menu to open "Import From Text" dialog.
Step 4 - Specify Importing Links Settings
Press the "Browse..." button to select the input file. Alternatively, check an option for automatically import links from the text file with the same name as the current PDF document (with *.pdf.links.txt extension). The last option is useful in batch processing mode, because it allows automatic importing document-specific files based on PDF file names. Optionally, click "Edit Page Range..." button to select a page range for the importing. Click "OK" to start importing.
The dialog will show the total number of links imported. Click "OK".
We have succesfully updated links in the PDF file with the edited versions. The same procedure can be used to transfer links to another PDF document(s) or for compiling links from multiple sources into a single PDF file.