Hi. I need to recover author and subject info from a PDF document, and show these two values in a php page, along with the pdf filename.
How can I do that?
Is there a function equivalent to PDF_get_info() in PHP5?

    Um, sure about the name? [man]pdf_get_info[/man] isn't in the manual: it's not a user-defined function, is it?

      I think he wants a function named pdf_get_info() to get the author and subject of PDF documents...

        Yes, that´s correct, but the manual says this function is no longer supported since PHP3, and there´s no indication about what function replaces it.

        Strangely, function pdf_set_info () still exists.

          Okay, twenty seconds' searching of the manual (mainly by following "See Also:" links) I find [man]pdf_get_parameter[/man].

            Thanks, for the tip.

            But with parameters should I use to restore the author and Subject.

            Should it be something like:

            $author= pdf_get_parameter($pdf, "author", 0);
            $subject= pdf_get_parameter($pdf, "subject", 0);

            will it work?

            I´m asking that because my development environment isn´t yet build, and I also must install pdflibs in my php system to make it work. I would appreciate if you answer me this last question.

              Write a Reply...