hanneskod / libmergepdf

PHP library for merging multiple PDFs
388 stars 77 forks source link

PDF 1.7 merge not working #49

Open applyACS opened 4 years ago

applyACS commented 4 years ago

When merging with PDF 1.7 version it is not working "'Array to string conversion' in 'raw-content'" - I get this when using TcpdiDriver and of course: "'This PDF document probably uses a compression technique which is not supported by the free parser shipped with FPDI. (See https://www.setasign.com/fpdi-pdf-parser for more details)' in 'raw-content'" - this for FPDI

hanneskod commented 4 years ago

Yes some pdf features seems to make tcpdi blow up. I need the pdfs you are trying to merge to be able to reproduce. What php and lib versions are you using?

applyACS commented 4 years ago

1582646396_phpXTaAZU.pdf This is the pdf 1.7. The other one is generated using wkhtmltopdf(no issue here). php 7.3 or 7.4 iio/libmergepdf: 4.0.3

lgme commented 4 years ago

I encounter the same issues as above. Do you have any results @hanneskod ?

kaystrobach commented 4 years ago

@lgme can you please also provide the file - this makes it easier to debug and maybe raise a bugreport at Tcpdi and other used projects.

lgme commented 4 years ago

@kaystrobach Sure. Here: p1.pdf p2.pdf

kaystrobach commented 4 years ago

awesome! - will try to check that in the next days.

kaystrobach commented 3 years ago

sry took longer than expected, will try to take a look during the holidays

pulponair commented 3 years ago

Any news?

OlexandrPopov commented 3 years ago

It seems that for PDF 1.7 you need a commercial FPDI PDF-Parser. See more details here and here.