Support » Plugin: VoucherPress » [Plugin: VoucherPress] Corrupted pdf

Viewing 15 replies - 1 through 15 (of 38 total)
  • This is the error message: “Adobe Reader could not open ‘myvoucher.pdf’ because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn’t correctly decoded).”

    I have the same issue as BlackAngus; all PDFs obtained from this plugin are corrupt. I’ve tried opening them with Adobe Reader, Evince, The Gimp and Mod PDF – to no avail!

    Any help please?

    Cheers,
    Rainer

    Plugin Author Chris Taylor

    (@mrwiblog)

    A few people have had this problem, but I haven’t found a pattern yet. Can you supply full details of your WP installation, the voucher settings you’re using, and details of your server please.

    The program is running fine on my server. But I have had several users complain that they cannot open the PDF file. I have tested the PDF in my reader and it appears fine.
    WP 3.0.1

    I too am getting this very same error when trying to view the PDF file.

    This is the error message: “Adobe Reader could not open ‘myvoucher.pdf’ because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn’t correctly decoded).

    I hope this can be corrected, so I can try this out. It sounds like just what I was looking for too!!

    Hi, halalan. I figured out my problem was probably because the server I was on had 4.3 something php. I’ve switched to a host with 5.2 something php and VoucherPress works like a charm! So see what version of php you are running.

    I am using bluehost as my hosting account. All plugins have worked fine to date. I too am running PHP 5.2.14 However I also have it set for PHP5 (FastCGI) in the configuration. I have been using this again with no other issues. It says: All files with the extension .php will be handled by PHP5 FastCGI processes. FastCGI for PHP makes all your PHP applications run through mod_fastcgi instead of mod_suphp. This eliminates the overhead of loading the PHP interpretor on every hit. Since it is always in memory ready for the next hit, the responses will be generated faster.

    Maybe that will help figure out the issue somehow and maybe a fix too.

    I am on Godaddy w/ PHP Version: PHP 5.x – and I still don’t have this working.

    Anything that I should be looking for in my php.ini?

    I have the same problem on my local server with php 5.x.
    The voucher outputs readable pdf while using the serif 1 font.

    I tried opening the corrupted pdf in notepad and it shows “TCPDF ERROR: Could not include font definition file: courierb”.

    May be a font embedding problem is the cause of the pdf error.

    I just updated wordpress to newest release, had hoped just maybe that might help..NOPE. Oh well.. ANYBODY FIGURE OUT A FIX TO VIEW THE PDF FILE??

    ERROR I STILL GET WITH ALL FONT CHOICES WHEN PDF TRIES TO OPEN:

    This is the error message: “Adobe Reader could not open ‘myvoucher.pdf’ because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn’t correctly decoded).

    Incentive..GET IT WORKDING I WILL MAKE A $25 DONATION !!! Others join in and lets motivate the developer..

    Here’s some more info on my GoDaddy host running WP:

    WordPress version: 3.0.2 You have the latest stable version of WordPress.

    Operating System : Linux
    Server : Apache
    Memory usage : 26.53 MByte
    MYSQL Version : 5.0.91-log
    SQL Mode : Not set
    PHP Version : 5.2.14
    PHP Safe Mode : Off
    PHP Allow URL fopen : Off
    PHP Memory Limit : 256M
    PHP Max Upload Size : 128M
    PHP Max Post Size : 256M
    PHP Max Script Execute Time : 1600s
    PHP Exif support : Yes ( V1.4 )
    PHP IPTC support : Yes
    PHP XML support : Yes

    Plugin Author Chris Taylor

    (@mrwiblog)

    Thanks for reporting these problems. The closest thing I can see to a cause for this problem is from websitism:

    > I tried opening the corrupted pdf in notepad and it shows “TCPDF ERROR: Could not include font definition file: courierb”.

    So can everyone who has this problem please email me an affected voucher – plus details of the fonts chosen – to mrwiblog (at) gmail dot com. Thanks.

    I just emailed you a sample pdf file from my site that won’t open. I also have tried every font choice just to see..NO LUCK. I am sure it is something simple. One of those..that make you kick yourself once it is figured out. Good luck..great plugin..looking forward to test out a working version.

    Plugin Author Chris Taylor

    (@mrwiblog)

    It look like this is down to PHP running out of memory. Your PDF file contained this:

    <b>Fatal error</b>: Allowed memory size of 67108864 bytes exhausted (tried to allocate 7864320 bytes) in <b>[path removed]/wp-content/plugins/voucherpress/tcpdf/unicode_data.php</b> on line <b>16485</b>

    As the plugin uses TCPDF (http://www.tcpdf.org) to produce the PDF files I’ve built a new version using the latest TCPDF library. Please download it from here and let me know if it handles memory better (it works for me): http://www.stillbreathing.co.uk/misc/voucherpress.zip

    It’s a very large plugin (nearly 20mb) but that is almost entirely TCPDF. If there is a better way to create PDFs on the fly please tell me about it.

    Hi Chris,

    this works for me now for the first time! Thank you! 🙂 The PDFs open just fine.

    Now, this is what I get when I downloading a voucher:

    Warning: Unknown: open(D:\TEMP\PHP/sess_la8i93ts68sbpjq4q5nbjknv51, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
    
    Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (D:\TEMP\PHP) in Unknown on line 0

    ^^^ Needless to say, my site’s hosted on Linux, so there’s no “D:\” drive; maybe something in the code that needs to be cleaned up?

Viewing 15 replies - 1 through 15 (of 38 total)
  • The topic ‘[Plugin: VoucherPress] Corrupted pdf’ is closed to new replies.