Skip to main content

Hello FME community,

 

I am new to working with PDFs in FME and Python. I have two input files as following:

 

1.   The first file is a PDF named “all_maps.pdf” with around 1000 pages. Each page represents a single map, and the page number serves as the ID for each map.

PDF_File 

2.   The second file is a shapefile named “main_map.shp.” It contains mesh squares for the entire area, and each square represents a map in the PDF file with a unique attribute called “ID.” This ID corresponds to the map ID (page number) in the PDF file. 

Main_Map 

My aim is to combine the outputs of both datasets into a single PDF file, totaling 1001 pages. The primary map in the “main_map shapefile” should be on the first page, followed by the other 1000 maps, each with clickable links for every square on the first page. The objective is for the user to click on a specific square and navigate to the corresponding map in the same file.

 

For instance, if the user clicks on square number 60, the PDF should scroll down to page number 61 (map number 60).

 

I want to accomplish this using relative links on a local computer, as the output PDF file will be used locally only.

 

Does anyone have any potential solutions?

Hello @a_afiaax​, thank you for posting! Are you creating the local anchor URL's in the workspace? Or how are these currently being created? In FME's PDFStyler, we have the option to add interactivity to PDF features. If you expand the section, we can see an option for adding or embedding URLs. When testing the outputs, make sure you are using a PDF viewer application that supports URI actions, so links can be resolved properly. Let me know if this helps address your question! Happy to help, Kailin.


Reply