-
I'm using dompdf to generate PDFs that were previously generated by fpdf. I still need to use fpdi to merge all the individual PDFs into a single document. I was 99% done before I found that all the links that dompdf renders are stripped out by fpdi. It seems that fpdi likes URIs that are embedded within the /Annot object, rather than into their own linked /Action object. So fpdi allows the following link (generated in fpdf):
But it doesn't allow (generated in dompdf):
Although I've worked with fpdf and fpdi for a long time, I don't know much of about PDF standards. Is one of these link methods deprecated? I fear that moving away from fpdi isn't easy to do right now, so I need to determine whether I need to patch dompdf or fpdi to get these links working. ETA: After a bit more probing, I suspect fpdi is removing all links when merging files, regardless of the Annot vs Action tags mentioned above. I was confused because most of my previous pages were created in fpdf directly, and so they bypassed fpdi. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
FYI I'm using dompdf 2.0.0 in Drupal 9 via the entity_print module, fpdi 2.3.6, and fpdf 1.84. |
Beta Was this translation helpful? Give feedback.
-
It looks like this is by design? At least based on this (very old) post: https://www.sitepoint.com/community/t/tcpdf-and-fdpi-issue-with-links-in-pdf/71497. Since that's a very old post some things about import may have changed. An enterprising user did create an extension to maintain links: https://gist.github.com/andreyvit/2020422 |
Beta Was this translation helpful? Give feedback.
It looks like this is by design? At least based on this (very old) post: https://www.sitepoint.com/community/t/tcpdf-and-fdpi-issue-with-links-in-pdf/71497. Since that's a very old post some things about import may have changed.
An enterprising user did create an extension to maintain links: https://gist.github.com/andreyvit/2020422