[poppler] PDF with layers

Valerio Messina efa at iol.it
Sat Apr 8 15:13:39 UTC 2023


On 4/6/23 7:41 PM, Albert Astals Cid wrote:
> From a machine point of view that seems rather a weird thing to do, i would
> expect the output to have 8 layers one for each of the original layers.

this is what I expect when there are 4 layers in PDF1 and 4 "different 
named" layers in PDF2, the output PDF should have 8 layers with 
respective contents kept in the source layers.
 From what I understood the layers are common to all pages of a PDF, but 
(obviously) a page can use only some of the layers in the PDF.

When the name of (some) layers in PDF1 and PDF2 are the same, I expect 
the content from PDF1.layerN and PDF2.layerN are merged (still in 
different pages) in output PDF.layerN, and so on for other name matching 
layers.

In any case I hope you agree that merging two layered PDF and producing 
a layer less "PDFlayers_tst3_pdfunite22.03.0.pdf" output PDF is wrong in 
any case.


I repeated the test with pdfunite22.05.0 with same PDF v1.5, same results.


Once saw the files from Pablo that are PDF v1.7 (marked as generated by 
LuaMetaTeX + ConTeXt LMT), I repeated the test exporting from Scribus 
1.5.8 to PDF v1.6 (v1.7 isn't supported as now) and PDF/X-4, same results.
With files from Pablo the layers from first PDF are kept, and the one 
from second PDF are discarded, I cannot understand what make the 
difference in those PDF, maybe the source.


Maybe I will have access to a licensed copy of Adobe Acrobat to test 
what is the output of merging the same two files.
In case I will report, hope will help.

-- 
Valerio


More information about the poppler mailing list