Corrupt pdf files

(5 posts) (2 voices)

Tags:

No tags yet.

  1. labber, Member

    Our emailed reports have corrupt pdf files. Below is the code were using to generate the files.

    select 'dbr.mail'; select 'dbr.mail.attach', 'OCP Orders Yesterday - Total.pdf', 'http://reports.primetimesolutions.net/report.php?r=74&m=7&h=f6e84a62bce3ea3761417968d7b1dd99a472756e&export=pdf'; select 'dbr.mail.recipient', 'test@example.com', 'Test User';

    select 'dbr.mail.debug', 1;

    select '', '', 'OCP Orders Yesterday', 'See attached PDF';

    When i go to the report itself and click export and choose pdf it works fine. But the URL in the code is generating a bad pdf file. Any ideas?

    We are on RHEL 6.4 with PHP 5.4, Apache 2.2, and MySQL 5.5

    We also have Flash charts, Image charts (ChartDirector 5.1), Graphviz charts, and wkhtmltopdf installed

  2. myDBR Team, Key Master

    What is the size of the generated file? If you open it with an editor, do you see any error messages in it?

    --
    myDBR Team

  3. labber, Member

    The file is 666B. The error message on preview for the mac is: The file “OCP Orders Yesterday - Total.pdf” could not be opened. It may be damaged or use a file format that Preview doesn’t recognize.

  4. myDBR Team, Key Master

    Try to open the file with a text editor (like TextEdit.app) that does not try to interpret the PDF content.

    --
    myDBR Team

  5. labber, Member

    Bingo! It was related to a change i made on the vhost for that domain, it was getting redirected. Thanks for your help :)


Reply

You must log in to post.