Blank pdf document generated

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
adamos46
Joomla! Explorer
Joomla! Explorer
Posts: 275
Joined: Sat Apr 26, 2008 6:05 am
Location: New Jersey

Re: Blank pdf document generated

Post by adamos46 » Wed Sep 03, 2008 3:46 pm

I fixed it by my own.

With the combination of leeuniverse's suggestion and the replacent of components/com_content/helpers/icon.php:
$attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return false;";

with
$attribs['target'] = "_blank";
$attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return true;";

It will open a new window with the pdf working properly.

everything works great. I hope :)

leeuniverse
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Wed Oct 04, 2006 6:03 am

Re: Blank pdf document generated

Post by leeuniverse » Thu Sep 04, 2008 1:55 am

So your using some "cache" system...?

Maybe you need to delete the cache? But, I see you may have found a workaround. That's good. :)

myjl
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Mon Sep 08, 2008 5:39 pm

Re: Blank pdf document generated

Post by myjl » Mon Sep 08, 2008 5:51 pm

Hmmm,
I've tried the fix proposed by leeuniverse, tried the "bad one", tried to enable/disable cache, tried almost everything in any combination.

But still blank window when clicking on the pdf icon, either with FF3 or Safari.

I'm running on Mac OS, MAMP 1.7 (PHP 5.2.3, Apache 2.0.59, mySQL 5.0.41).
I have installed Joomla 1.5.6 from scratch.

Has anyone ever tried a such configuration ?
Many thanks for any help.

MyJL

User avatar
adamos46
Joomla! Explorer
Joomla! Explorer
Posts: 275
Joined: Sat Apr 26, 2008 6:05 am
Location: New Jersey

Re: Blank pdf document generated

Post by adamos46 » Mon Sep 08, 2008 6:59 pm

I am still trying to work on it. If you refresh after clicking on it it will show up. There's something that has to cache the articles so when you click on them the first time, the pdf will show up.

myjl
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Mon Sep 08, 2008 5:39 pm

Re: Blank pdf document generated

Post by myjl » Tue Sep 09, 2008 7:48 am

Ok, I've done what I should have done first : have a look in the log files.

In the php_error.log file, I get the following message each time I click on the pdf icon :
"PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4980736 bytes) in /Users/myjl/Sites/test/mysite/libraries/tcpdf/unicode_data.php on line 16467"

By looking in the joomla forum, I found a topic related to this issue :
http://forum.joomla.org/viewtopic.php?f=47&t=275276

In my case, I've added the following line in the index.php file of the site :
ini_set('memory_limit','64M');

And it works !
HTH
MyJL

User avatar
adamos46
Joomla! Explorer
Joomla! Explorer
Posts: 275
Joined: Sat Apr 26, 2008 6:05 am
Location: New Jersey

Re: Blank pdf document generated

Post by adamos46 » Tue Sep 09, 2008 4:08 pm

This should be a sticky. I changed in my php.ini the memory limit to memory_limit = 48M and the pdf loads fine from the first time when you click on it.

Thanks myjl.

-adam

mandalavillage
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Mon Jan 28, 2008 4:40 am

Re: Blank pdf document generated

Post by mandalavillage » Sun Sep 14, 2008 4:36 pm

This is workimg.. however I still have a problem with the pdf text ormat.. some letters or even phrases are missed... looks like it is not creating a proper and well-formatted text ! why ? did anyone realized it ? how to fix it ? thanks in advance...

AbyssLLC wrote:
gelauff wrote:Not very elegant but it works:
Backup: components/com_content/helpers/icon.php
Then on line 58 replace:

Code: Select all

$attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return false;";
with:

Code: Select all

$attribs['target'] = "_blank";
This will give you a new browser window (in FF a new tab) in stead of a popup, gets you going for the time being.
Hopefully the Joomla team will find the real solution.
Thanks. The above simple change worked. I appreciate it. Have a great day! :D

leeuniverse
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Wed Oct 04, 2006 6:03 am

Re: Blank pdf document generated

Post by leeuniverse » Wed Sep 17, 2008 2:16 am

Well, the first thing is to use the "proper" fix, and then the memory limit fix if you need.
The second would be your likely out of luck. Although, is there a "third party" pdf extension? Maybe?

badgerdog
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Oct 11, 2008 3:02 am

Re: Blank pdf document generated

Post by badgerdog » Sat Oct 11, 2008 3:38 am

All - I've tried ALL the fixes for the pdf document generation and NONE of them work - I'm running Joomla 1.5.7

Any other suggestions for fixing this? I've tried all this fixes posted here, and even tried them is several combinations - none work.

Aprreciate all help

thanks

User avatar
adamos46
Joomla! Explorer
Joomla! Explorer
Posts: 275
Joined: Sat Apr 26, 2008 6:05 am
Location: New Jersey

Re: Blank pdf document generated

Post by adamos46 » Sat Oct 11, 2008 4:26 am

Whats the memory limit in php.ini?

badgerdog
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Oct 11, 2008 3:02 am

Re: Blank pdf document generated

Post by badgerdog » Sat Oct 11, 2008 4:05 pm

memory_limit = 48M

Thanks... should it be higher?

By the way, it works in FF. FF wants to download the pdf when I click, but if I just tell FF to open, instead of downloading, it opens right up. With IE7, have not tried IE6 yet, when I click the pdf icon, it just opens a blank window - not a full browser window.

With all the recommendations read on this forum, I can get IE7 to open a window, open a tab, and open a new browser window, but none of them display the pdf. If I right-click the pdf and either open in new window or tab, I get a blank page. If I right-click and try to save the pdf, IE gives me an error saying the file cannot be saved to cache.

I've tried all the changes recommended on this forum and bug track:

updated php.ini memory to 64M
modified libraries\joomla\environment\response.php
added libraries/joomla/utilities/browser_detection.php
modified components/com_content/helpers/icon.php


Nadda, zip, nothing works.

Thanks for any help - using Joomla 1.5.7 on Linux

User avatar
bushie
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Sat Dec 10, 2005 5:48 am
Location: Victoria, Australia
Contact:

Re: Blank pdf document generated

Post by bushie » Sun Apr 26, 2009 10:32 pm

I have listed this item on the Joomla bug tracker as it didn't seem to be there and still doesn't seem to be resolved in 1.5.10

The item listing ID in the bug tracker is 16149

Cheers,


Ric

DianaRae
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Dec 26, 2008 5:52 pm
Contact:

Re: Blank pdf document generated

Post by DianaRae » Tue Jun 09, 2009 8:15 pm

I just used this "fix" on Joomla 1.5.11. It worked in IE7, IE8, FF, Opera & Chrome!

Thanks so much. :D
leeuniverse wrote:Okay..... Further testing I've figured out what looks like the TRUE FIX for this issue across ALL BROWSERS on a fresh install of Joomla 1.5.6, SEO activated, and using eXtplorer extension to edit the files.

Per the fix listed at the above link (cudo's to the guy who found the fix), this is what needs to be done:

Go into "libraries\joomla\environment\response.php" at line 201, and this code is listed:
JResponse::setHeader( 'Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', false );
Replace the above with these two lines:
JResponse::setHeader( 'Cache-Control', 'no-store, no-cache, must-revalidate', true ); // Extra CYA
JResponse::setHeader( 'Cache-Control', 'post-check=0, pre-check=0', false ); // HTTP/1.1
This correction which is from a previous version (per the link above) causes the PDF to work correctly and consistently (according to the proper joomla behavior of opening the pdf) across ALL browsers that I listed above, even Opera works. This thus appears to be the correct fix. Of course, still don't know if it "really" is, why this was changed in later Joomla's. Maybe a mistake?

rodolfo
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Jun 17, 2008 5:57 pm

Re: Blank pdf document generated

Post by rodolfo » Thu Jun 18, 2009 10:31 pm

I applied the
'JResponse::setHeader( 'Cache-Control', 'no-store, no-cache, must-revalidate', true ); // Extra CYA
JResponse::setHeader( 'Cache-Control', 'post-check=0, pre-check=0', false ); // HTTP/1.1'
fix for the PDF issue on Joomla 1.5.11 and works fine with Internet Explorer 8.0 and FF 3.0.11. Thanks!

Testing123
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Thu Aug 18, 2005 2:45 pm

Re: Blank pdf document generated

Post by Testing123 » Thu Jul 02, 2009 10:09 pm

This (DianaRae's post 2 above this one) worked for me as well.
Thank you!
Do you want to be able to associate a content item (artlcle) with more than 1 category in Joomla!?
Please add your voice to the following thread: http://forum.joomla.org/viewtopic.php?f=580&t=525316

krdo
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Jul 03, 2009 3:07 am

Re: Blank pdf document generated

Post by krdo » Fri Jul 03, 2009 4:32 am

gelauff wrote:Not very elegant but it works:
Backup: components/com_content/helpers/icon.php
Then on line 58 replace:

Code: Select all

$attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return false;";
with:

Code: Select all

$attribs['target'] = "_blank";
This will give you a new browser window (in FF a new tab) in stead of a popup, gets you going for the time being.
Hopefully the Joomla team will find the real solution.
Thank you so much !!! Works perfectly :D

hamsel
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Sun Oct 30, 2005 1:39 am
Location: Denmark
Contact:

Re: Blank pdf document generated

Post by hamsel » Wed Jan 12, 2011 10:34 pm

The MSIE 7 (and MSIE 8) problem still exists in Joomla 1.5.22. Seems like leeuniverse's fix (displayed above) didn't make it to the core guys, unfortunately, although it's been posted here some 15 months ago.

For others to know: leeuniverse's fix works brilliantly with 1.5.22, with MSIE 7 and with MSIE 8.

/Per Hertz

User avatar
H13
Joomla! Ace
Joomla! Ace
Posts: 1545
Joined: Sun Dec 10, 2006 6:39 pm
Location: Czech Republic
Contact:

Re: Blank pdf document generated

Post by H13 » Tue Oct 16, 2012 9:07 pm

Hi, you can set in plugin that the pdf will be downloadable (instead of displaying in browser), if you will be able to download the blank pdf, mostly the php error is displayed there (you can edit the pdf document in text editor and you will see (maybe) php errors displayed at the top of the document source) ... Maybe this can help while searching for the error :idea:
- Phoca Cart - Joomla eCommerce App - https://www.phoca.cz/phocacart
- Phoca Gallery - powerful image gallery
- Phoca Restaurant Menu - https://www.phoca.cz/phocamenu
- Phoca Download - download manager for Joomla


Locked

Return to “Administration 1.5”