WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms PDF Extended
[resolved] The file is damaged and could not be repaired. (12 posts)

  1. tcsolutions
    Member
    Posted 1 year ago #

    Hi,
    I am trying to use the 1.1.0 version and I am experiencing a strange problem.

    When I have a list of entries and hover to then choose view PDF I nearly always receive an error. On IE9 and firefox it says The file is damaged and could not be repaired. Local\blah temp name. On Chrome I get Failed to load pdf document.

    I say nearly always because sometimes view PDF on the very same entry actually works. It is a bit hit and miss for some reason (mostly miss).

    I don't experience any kind of problem on short simple forms. I am getting this odd behaviour on a longer 3 page entry with signature, address fields etc.

    Thought I would raise it in case others start to experience it and I will see if I can spot anything or narrow down the problem. I have plenty of memory allocated so that shouldn't be it. Maybe a hosting mime type or something ?

    http://wordpress.org/extend/plugins/gravity-forms-pdf-extended/

  2. Blue Liquid Designs
    Member
    Plugin Author

    Posted 1 year ago #

    Hi tc,

    I've never experienced this type of problem before. Are you able to create and attach the PDF to an attachment (see documentation for tutorial on how to do this)?

    I'll have a look into the problem for you.

  3. Blue Liquid Designs
    Member
    Plugin Author

    Posted 1 year ago #

    Hi tc,

    I had a look into the issue and it doesn't look like a problem with the plugin. The fact that it works with single-page PDFs (ie. the file sizes aren't as large) makes me thing this topic might help:

    http://thenubbyadmin.com/2012/04/13/solving-the-error-the-file-is-damaged-and-could-not-be-repaired-when-opening-a-pdf-in-internet-explorer/

    Let me know how you go.

  4. tcsolutions
    Member
    Posted 1 year ago #

    Thanks - I am still trying to work it out. Seems to be only happening with my forms containing the signature. I will try the create and attach to see what I get and let you know. I get it on all sorts of browsers including an ipad.

    When I open up the corrupted PDF using a text editor it looks like it hasn't got to the end. Maybe a socket time out on the stream or dompdf doesn't like something in the markup. It could be the latter as I did see something while fiddling around (changed stream to output) but I got sidetracked so will have another look when I can.

    Is there a min php level as my host uses 5.2.7.

    I will post up any thing I find out.

  5. Blue Liquid Designs
    Member
    Plugin Author

    Posted 1 year ago #

    Any PHP 5 version will be fine.

    It could be because your host hasn't allocated PHP enough memory to complete the PDF conversion. You can create a PHP file and run phpinfo(); to determine how much memory is allocated. Alternatively you can contact your web host.

  6. tcsolutions
    Member
    Posted 1 year ago #

    My PHP mem limit is 256Mb with samle usage of 40.2M and all time high of 53.69Mb (when my daily backup to google drive occurs).

    I will do some more trouble shooting and let you know what I find out.

  7. tcsolutions
    Member
    Posted 1 year ago #

    I haven't yet tried to create and attach the pdf to a document.

    Using view and download from the gravity form entry itself is producing the problem on both my sandbox and live site. Most forms ok just this bigger one that has signature etc.

    No access to server logs on my production host but did see this on the development system

    [Sat Nov 03 10:42:19.386660 2012] [:error] [pid 4796:tid 964] [client 127.0.0.1:54273] PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity, line: 132 in C:\\Program Files (x86)\\EasyPHP-12.1\\www\\wordpress\\wp-content\\plugins\\gravity-forms-pdf-extended\\render_to_pdf.php on line 70, referer: http://localhost/wordpress/?gf_pdf=print-entry&fid=15&lid=696&notes=1
    [Sat Nov 03 10:42:19.387660 2012] [:error] [pid 4796:tid 964] [client 127.0.0.1:54273] PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity, line: 135 in C:\\Program Files (x86)\\EasyPHP-12.1\\www\\wordpress\\wp-content\\plugins\\gravity-forms-pdf-extended\\render_to_pdf.php on line 70, referer: http://localhost/wordpress/?gf_pdf=print-entry&fid=15&lid=696&notes=1

  8. forgetfuljames
    Member
    Posted 1 year ago #

    Hi tc and blue,

    I'm having essentially the same problem as tc.

    I currently have:

      31 entries
      1 entry returning parse error below (a)
      1 entry entry returning (b)

    I've tested all of the other entries and they display as PDFs without a problem.

    This happens no matter where I click (both the link that shows while hovering over the entry date and the two single entry buttons 'View' or 'Download' are creating the same statements)

    (a)

    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: no name in Entity, line: 44 in /mnt/web3/e2/87/53531087/htdocs/WordPress_03/wp-content/plugins/gravity-forms-pdf-extended/render_to_pdf.php on line 109
    Unable to stream pdf: headers already sent

    (b)

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, service@webmailer.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    I'm new to PHP — could this be caused by a PHP memory issue?

    The end user has had connectivity issues (currently using WLAN at a convention) — could it be a data corruption issue?

    Thanks in advance for any help you can lend.

  9. Blue Liquid Designs
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    The DOM warning is due to invalid HTML being loaded. Please validate your template file to find the cause of the problem.

    The Internal Server Error could be anything. You'll need to review your server logs and find the actual error message generated.

    Kind Regards,

  10. tcsolutions
    Member
    Posted 1 year ago #

    In my case I am not using a template file. It's straight gravity forms entries as GF creates them that I am trying to view / download. So it's probably something gravity is incorrectly formatting.

    Here is a copy of errors I just got using the latest versions of everything.

    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: no name in Entity, line: 141 in /home/gymbaroo/public_html/hills/wp-content/plugins/gravity-forms-pdf-extended/render_to_pdf.php on line 109

    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: no name in Entity, line: 144 in /home/gymbaroo/public_html/hills/wp-content/plugins/gravity-forms-pdf-extended/render_to_pdf.php on line 109

    Fatal error: Maximum execution time of 30 seconds exceeded in /home/gymbaroo/public_html/hills/wp-content/plugins/gravity-forms-pdf-extended/dompdf/include/frame_decorator.cls.php on line 393

  11. Blue Liquid Designs
    Member
    Plugin Author

    Posted 1 year ago #

    I'm not going to be able to debug it without looking at your system. If you would like me to go in and sort through the issue please send me an email and we can discuss costs - enquire[at]blueliquiddesigns[dot]com[dot]au.

  12. tcsolutions
    Member
    Posted 10 months ago #

    The problem I was having seems to have been resolved with recent updates to the plugin.

    Since going 1.7.5 gravity forms and 3.0.2 for your plugin.

    Thank you for the update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.