Adding links to PDFs using PHP ezPDF

I’ve been making some changes to a site which already uses the ezPDF class for creating PDFs from PHP. How to insert a link?

Helper methods seem to exist but they are not documented in the code and are a bit confusing to read. Instead, you can just embed a hyperlink into any (I think) text entry and it’ll be converted into a clickable link. Use the syntax below.

A very simple example of a complete PDF generation is shown here:

Note: you can get the complete “R&OS” ezPDF class here

  • ROunofF

    I’m having roughly the same issue. This syntax got you underlined link in the pdf? I’m not getting any kind of link using this syntax (Well automatic url linking not anything clean), maybe there is some options to be passed to $pdf?