[Plugin: VoucherPress] Corrupted pdf
-
When I download the voucher I get an error message “Corrupted pdf.” I see a couple other people have had this problem but I don’t see where it was resolved.
-
Err – I take that back. Any subsequent attempt to create a voucher has produced a similar outcome as stated initially – I cannot open the PDF because it is corrupt. ??
The file-size on those corrupted ones is 1 or 0KB respectively, while the one that worked (the first one I’ve done after I updated the plugin) is 126KB.
Any ideas?
>>It look like this is down to PHP running out of memory.
A great (and easy to use) plugin for cleaning up the database is GD Press Tools. Plus you can easily change the memory allotment for php.
From WordPress:
“GD Press Tools is a collection of various administration, seo, maintenance, backup and security related tools. This tools can be integrated into the various WordPress admin panels, can perform maintenance operations, change some aspects of WordPress…”
rrohde: OK, I think it was too much to expect it to work flawlessly first time. I’ll work on this some more soon. Thanks for your patience.
Chris – no, THANK YOU for all the effort! This is truly a remarkable WP plugin. Keep up the fantastic work! ??
Chris – I’ve got a question: is there any way to implement this voucher plugin with WP e-commerce so that I can actually sell those vouchers as gift certificate if I wanted to?
rrohde: At the moment no, but the next version of the plugin contains several custom actions which may make it possible to integrate the two plugins. I’m afraid I don’t have time to do that myself, though.
To anyone getting the “corrupted PDF” problem: Can you open one of the broken PDFs in a text editor and if it looks like a PHP error paste the details here. Thanks.
I am still not having any luck, I tried the new update large file, but it would not properly activate in the backend, I reloaded the older version and get that now memory error. Only plugin to do that to me.
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 7864320 bytes) in /home1/ctoanet/public_html/mainstreethardy/wp-content/plugins/voucherpress/tcpdf/unicode_data.php on line 16485
I’ve just released version 1.2 of VoucherPress which should fix the out of memory error, and the activation problem. There are also several other features in this release – although be warned: I haven’t had chance to test this as thoroughly as I would like. The bugfixes/new features are:
– Changed templates to work at 150dpi (1181 x 532 pixels) to overcome memory limit problem
– Added code which attempts to temporarily increase PHP memory limit to 64mb while a voucher is being rendered
– Fixed activation bug caused by WordPress breaking the Plugin Register plugin
– Upgraded to recent version of TCPDF
– Allowed CSV download for all vouchers, not just ones requiring an email address
– Added nonce fields for securityThe next version of VoucherPress will be a complete rewrite as the code is currently very messy. I also hope to include a feature to create vouchers of different sizes, and have the option to format the vouchers in more ways.
Please report any problems using the forum system on www.ads-software.com as this allows me to manage all the bugs: https://www.ads-software.com/extend/plugins/voucherpress/
Just upgraded and still same problem when trying to view the PDF file. I get the:
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).
Maybe I need to delete the plugin completely and try to reinstall? I will try it just for the heck of it.
Hi Chris
Thank you so much for hard working.Here`s an error i see when i open pdf in text editor
————————————————————-
<b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in <b>/home/content/j/o/e/joeswolfrd/html/wp-content/plugins/voucherpress/voucherpress_pdf.php</b> on line <b>14</b>
————————————————————-
Does anyone know what i can do in order to download and open pdf ???Hi, I’m using plugin version 1.2 on WP 3.0.4 and I have the file corrupted error. I have set a memory limit up to 2048M in my php.ini file so it can’t be the memory.
The PDF generated for previewing coupons in the admin works fine. It’s only the production coupons with codes that makes corrupted pdf files.
This is the output of a pdf file opened in a text editor:
%PDF-1.7
5 0 obj
<< /Type /Page /Parent 1 0 R /LastModified (D:20110108185610+00’00’) /Resources 2 0 R /MediaBox [0.00 0.00 566.93 255.12] /CropBox [0.00 0.00 566.93 255.12] /BleedBox [0.00 0.00 566.93 255.12] /TrimBox [0.00 0.00 566.93 255.12] /ArtBox [0.00 0.00 566.93 255.12] /Contents 6 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /Annots [ 4 0 R ] /PZ 1 >>
endobj
6 0 obj
<</Filter /FlateDecode /Length 354>> stream
x?¥“?n?0E÷ù?Y???G?tY^*j+¨2…J??à?Rt?“?B¤€D?”±£±???±í???8(>`<¥)¢èS,??ü
?9?è?ˉ+?“?”íy,?$a ′f( _??ù??#gT?xHéR?\`?Bh ?x?sR?r??ò?úw?[òPu!y“?á??3μs??3Kv T?
ú¢
)?í2J0-Thanks for your help!
PS: I didn’t see this post at first and I created another post. Sorry for this, I can’t delete it.
I finally got mine to work for the FIRST time once I went and set my memory in the MAIN php.ini file to 128M. In some versions of wordpress it has its own memory setting. Is it possible even though you set it in the Main php it is getting reset within the wordpress directory? Just a thought.
In wordpress it isn;t in the PHP file its in another file name where memory is set.. I JUST CANT REMEMBER IT RIGHT NOW ?? Just a thought to check into.
If you’re having problems it’s likely the plugin didn’t install properly (the size is something I’m working on). Try deactivating, deleting the files – don’t worry, your vouchers will be safe – then reinstalling.
Let me know here if you still have problems.
Thank you for your reply, Chris.
Unfortunately it did not help.
I still have the very same problem. Nothing in the logs.
But since the generation of the preview pdf works, I thought the problem could come from the coupon code generation. Do you know how could I catch an error there?
By the way, did you test it with WP 3.0.4?Thanks a lot
Thank`s to everyone trying to help others and
huge respect for “Chris Taylor” for make such a nice plug-in.
—————————————————————
My issue was the hosting (GoDaddy).
Make sure that you guys have php5, by running info.php
cPanel`s might get it wrong.
- The topic ‘[Plugin: VoucherPress] Corrupted pdf’ is closed to new replies.