tcpdi
tcpdi copied to clipboard
PDF Annotations/hyperlinks are not preserved
Any documents that have PDF annotations/links in them will be lost when using TCPDI.
I think - however - that this is a problem with FDPI.
I came to this github project hoping that TCPDI would properly preserve links (contrary to FPDI) but that appears not to be the case ?
/Henrik
Hi @henrywood, I've just pushed v1.1 of TCPDI and tcpdi_parser, which (together) support importing annotations. Can you please try again using v1.1, and report back with the results? If your content is still not fully supported, can you please either attach a sample PDF here or email it to me at tcpdi-samples at nex.gen.nz, so I can dig deeper?
Hi all, I've tried the new version with a file highlighted with PdfClown and it seems not working. 572b0b9e80fed.pdf
I initially only followed @pauln 's instructions above (meaning I updated TCPDI and tcpdi_parser) which did not make the preservation of highlights work for me.
After this I followed the instructions in the updated readme which states that you need to adjust:
$pdf->importPage(1, '/BleedBox');
and add:
$pdf->importAnnotations(1);
This fixed the issue for me and highlights are now preserved after my document has been run through TCPDI. I'm pointing this out simply for people reading this that searched for 'tcpdi highlight' and might make the same mistake as I did.
My thanks to @pauln for supporting annotations in version 1.1