AnsweredAssumed Answered

Merging PDFs without losing Layers (PDF Viewer)

Question asked by on Dec 5, 2019

Hi all,


Does anybody know how to merge two PDFs using Python while maintaning layers as shown on the attached picture?


I am using arcpy for ArcGIS Pro to export an 'Overview' PDF and a 'Detailed Location' PDF.


Both PDFs contain the layers once they're opened on PDF viewer. However, when I merge both PDF 'lots' within a single 'Map Book' PDF using 'arcpy.PDFDocumentCreate' and '<pdfDoc>.appendPages', those layers are lost.


I have also tried PdfFileMerger within PyPDF2 Library without success,


Any thoughts?


Thanks, Ana