Blank pdf document generated
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.
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.
-
- Joomla! Apprentice
- Posts: 18
- Joined: Sun Sep 24, 2006 7:07 am
Blank pdf document generated
Hi,
I just installed a clean version of 1.5.1 and I noticed that the pdf functionality is not working. I get a popup which is completely blank. I didn't experience this problem at all with the 1 series of Joomla.
There's no error message so I have no clue what to look for.
Does anybody know what could be the problem?
Chantal
I just installed a clean version of 1.5.1 and I noticed that the pdf functionality is not working. I get a popup which is completely blank. I didn't experience this problem at all with the 1 series of Joomla.
There's no error message so I have no clue what to look for.
Does anybody know what could be the problem?
Chantal
-
- Joomla! Apprentice
- Posts: 8
- Joined: Thu Feb 14, 2008 3:09 am
Re: Blank pdf document generated
Hi Chantal,
I have exactly the same problem! Clean 1.5.1 install, everything looks OK, but the pdf button does not produce the expected result. The pop-up window is blank not even showing the Acrobat menu or any error message. That is no matter what template I choose. While having a seperate 1.0.14 intall in a second browser tab (IE7), there is no problem gererating a pdf pop-up with a click on the pdf button. So, IE7 configuration issues can be ruled out !? Strange...
But I noticed the following: if I right-click the pdf icon in the 1.5.1 install and choose either "Open Link", "Open Link in New Tab", or "Open Link in New Window" then the correct (small) pop-up window with the pdf (and Acrobat menu) is displayed.
Try it out and tell me if it works for you.
Hope some PHP guys can comment on this.
hewie
I have exactly the same problem! Clean 1.5.1 install, everything looks OK, but the pdf button does not produce the expected result. The pop-up window is blank not even showing the Acrobat menu or any error message. That is no matter what template I choose. While having a seperate 1.0.14 intall in a second browser tab (IE7), there is no problem gererating a pdf pop-up with a click on the pdf button. So, IE7 configuration issues can be ruled out !? Strange...
But I noticed the following: if I right-click the pdf icon in the 1.5.1 install and choose either "Open Link", "Open Link in New Tab", or "Open Link in New Window" then the correct (small) pop-up window with the pdf (and Acrobat menu) is displayed.
Try it out and tell me if it works for you.
Hope some PHP guys can comment on this.
hewie
zeebeest wrote:Hi,
I just installed a clean version of 1.5.1 and I noticed that the pdf functionality is not working. I get a popup which is completely blank. I didn't experience this problem at all with the 1 series of Joomla.
There's no error message so I have no clue what to look for.
Does anybody know what could be the problem?
Chantal
-
- Joomla! Apprentice
- Posts: 18
- Joined: Sun Sep 24, 2006 7:07 am
Re: Blank pdf document generated
Hi Hewie,
I'm using IE7 as well. If I right-click on the pdf icon and select open in new tab then I do get a pdf file . I think this is good news as at least the problem is not caused by some configuration issue of my hosting account :-). It's not workable though for visitors using IE7...
I'll go and dive into the code to see if I can find something...
Now that I've seen the pdf *yeah* I wonder why the footer/header doesn't contain the website address anymore like in the 1.0 versions. I guess this is something for a new topic.
Chantal
I'm using IE7 as well. If I right-click on the pdf icon and select open in new tab then I do get a pdf file . I think this is good news as at least the problem is not caused by some configuration issue of my hosting account :-). It's not workable though for visitors using IE7...
I'll go and dive into the code to see if I can find something...
Now that I've seen the pdf *yeah* I wonder why the footer/header doesn't contain the website address anymore like in the 1.0 versions. I guess this is something for a new topic.
Chantal
- diver165
- Joomla! Enthusiast
- Posts: 105
- Joined: Sun Jun 24, 2007 6:12 pm
Re: Blank pdf document generated
Yeah there are issues with Joomla and IE7 handling the PDF window popup. Actually it doesn't do a popup period, it opens to a new tab when the button is clicked that is blank. The PDF button works in IE 7 is to right click it and open in new window or open in new tab.
Oh and a little test on my side, I get the same results in Opera v9.25. Seems to work OK in Safari and FF.
Oh and a little test on my side, I get the same results in Opera v9.25. Seems to work OK in Safari and FF.
-
- Joomla! Apprentice
- Posts: 8
- Joined: Thu Feb 14, 2008 3:09 am
Re: Blank pdf document generated
Yes, Firefox has no problem with opening the correct pdf pop-up. What I find strange is that I get different results with IE7, depending on what computer I use. On my desktop, IE7 opens the small pdf pop-up window no matter what "Open..." I choose in the right-click menu. On my laptop however the same procedure results in the opening of a new Tab or new complete browser window. Strange...
I noticed a post from Norway folks where they might have discussed the same issue. One poster mentioned to try out his 1.5.1 install because it is working just fine. Go to http://demo.joomlainorge.no/j15/ and try it out with your IE7! The pdf pop-up from this site works with my IE7.
The href command in the source code, especially the onclick handler, is not different from my own.
Any ideas how I can get this damn pdf button to work?
I noticed a post from Norway folks where they might have discussed the same issue. One poster mentioned to try out his 1.5.1 install because it is working just fine. Go to http://demo.joomlainorge.no/j15/ and try it out with your IE7! The pdf pop-up from this site works with my IE7.
The href command in the source code, especially the onclick handler, is not different from my own.
Code: Select all
<td align="right" width="100%" class="buttonheading">
<a href="/j15/index.php?view=article;&catid=1:siste-nytt&id=1:velkommen-til-joomla&format=pdf" title="PDF" onclick="window.open(this.href,'win2','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no'); return false;" rel="nofollow"><img src="/j15/images/M_images/pdf_button.png" alt="PDF" /></a> </td>
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Feb 19, 2008 12:45 am
Re: Blank pdf document generated
Long time reader - first time poster here...
I've been battling with the same problem the last couple days! My server is a virtual machine (VMWare), W2K3, IIS6, PHP5.2.5 and I'm browsing with IE7... The server has 5 installations of Joomla, 4 of them are v1.5.0 and the PDF button is working fine. The fifth and latest installation is Joomla 1.5.1 and the pdf icon is behaving as described above, that is I get a blank popup when clicking on it normally while the pdf works fine if I open the link in a new window or tab.
I am going to try installing another 1.5.1 to see if I run into the same problem, if I do, I'll install 1.5.0 and see how that goes.
Thanks
I've been battling with the same problem the last couple days! My server is a virtual machine (VMWare), W2K3, IIS6, PHP5.2.5 and I'm browsing with IE7... The server has 5 installations of Joomla, 4 of them are v1.5.0 and the PDF button is working fine. The fifth and latest installation is Joomla 1.5.1 and the pdf icon is behaving as described above, that is I get a blank popup when clicking on it normally while the pdf works fine if I open the link in a new window or tab.
I am going to try installing another 1.5.1 to see if I run into the same problem, if I do, I'll install 1.5.0 and see how that goes.
Thanks
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Feb 19, 2008 12:45 am
Re: Blank pdf document generated
Just to confirm, I have reinstalled both 1.5.0 and 1.5.1 and I'm having no problems with 1.5.0, while the newer version is still not working for me...
If it helps I can post links to the two versions I just installed using the sample database and default template. Everything is identical except for the Joomla version.
Regards
If it helps I can post links to the two versions I just installed using the sample database and default template. Everything is identical except for the Joomla version.
Regards
- gelauff
- Joomla! Apprentice
- Posts: 12
- Joined: Tue Oct 16, 2007 1:19 pm
- Location: Grenoble, FRANCE
- Contact:
Re: Blank pdf document generated
Not very elegant but it works:
Backup: components/com_content/helpers/icon.php
Then on line 58 replace:
with:
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.
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;";
Code: Select all
$attribs['target'] = "_blank";
Hopefully the Joomla team will find the real solution.
Problem is a wrong word for solution.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Feb 19, 2008 12:45 am
Re: Blank pdf document generated
Beautiful! That worked just fine, thank you!!
-
- Joomla! Apprentice
- Posts: 18
- Joined: Sun Sep 24, 2006 7:07 am
Re: Blank pdf document generated
Thank you
-
- Joomla! Apprentice
- Posts: 8
- Joined: Thu Feb 14, 2008 3:09 am
Re: Blank pdf document generated
Interesting! That fix results in the original small pop-up window with the pdf for me (IE7).
That's great! Thanks to Grenoble.
That's great! Thanks to Grenoble.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Feb 19, 2008 12:45 am
Re: Blank pdf document generated
On my end it's opening a new window in IE7 (has toolbars and such) while the original script was a popup without toolbars... As long as it works!hewie wrote:Interesting! That fix results in the original small pop-up window with the pdf for me (IE7).
That's great! Thanks to Grenoble.
- gelauff
- Joomla! Apprentice
- Posts: 12
- Joined: Tue Oct 16, 2007 1:19 pm
- Location: Grenoble, FRANCE
- Contact:
Re: Blank pdf document generated
A few lines above there are definitions for the popup window, which are appearantly read by your browser.hewie wrote:Interesting! That fix results in the original small pop-up window with the pdf for me (IE7).
That's great! Thanks to Grenoble.
Strange thing indeed, but don't count on other IE7 versions to do the same thing.
My advice is to keep yourself informed of new updates, like I said, my solution is not very elegant.
-
- Joomla! Apprentice
- Posts: 43
- Joined: Thu Nov 23, 2006 7:52 pm
Re: Blank pdf document generated
I've got a solution to this (thanks to Ed)
You need a file: I can send you this by e-mail. Please request at [email protected]
Extract and upload in to
Now find in
Place this
in line 2
Now change this line of code (line 58)
to this
That should cure the problem!
Simon
You need a file:
Code: Select all
browser_detection.php
Extract and upload in to
Code: Select all
libraries/joomla/utilities/
Code: Select all
ICON.PHP
Code: Select all
components/com_content/helpers/
Code: Select all
require_once("libraries/joomla/utilities/browser_detection.php");
Now change this line of code (line 58)
Code: Select all
$attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return false;";
to this
Code: Select all
$user_browser = browser_detection('browser');
if ($user_browser == 'msie7') {
$attribs['target'] = '_blank';
} else {
$attribs['onclick'] =
"window.open(this.href,'win2','".$status."'); return
false;";
}
Simon
-
- Joomla! Apprentice
- Posts: 12
- Joined: Fri Aug 19, 2005 3:59 pm
Re: Blank pdf document generated
I put my solution on the tracker a while ago: http://joomlacode.org/gf/project/joomla ... m_id=10656
It concers a change that was made between 1.5.0 and 1.5.1.
It concers a change that was made between 1.5.0 and 1.5.1.
-
- Joomla! Apprentice
- Posts: 43
- Joined: Thu Nov 23, 2006 7:52 pm
Re: Blank pdf document generated
Strange - I can clearly see the posted (simple) solution yet when I was searching for this very thing it failed to show (otherwise I'd have given it a go!). In my extensive 2 hour trawl looking for a solution it would seem many others have failed to find this thread as well. "Why are search engines not indexing keywords from the http://joomlacode.org tracker project??" I ask aloud.
Simon
Simon
-
- Joomla! Apprentice
- Posts: 28
- Joined: Sun Aug 03, 2008 11:57 am
Re: Blank pdf document generated
wonderful!! works like a charm now!
replaced line 58 in icon.php to $attribs['target'] = "_blank";
wonderful
wonderful
works in FF and IE now.
replaced line 58 in icon.php to $attribs['target'] = "_blank";
wonderful
wonderful
works in FF and IE now.
-
- Joomla! Apprentice
- Posts: 36
- Joined: Wed Oct 04, 2006 6:03 am
Re: Blank pdf document generated
My IE6 using Maxthon classic wasn't able to open directly, it would open my Adobe and then simply give a message "cannot open file" or some such. IE6 by itself would simply open a save dialoge. Simply changing to the above in line 58 was simple and easy and works in my maxthon, ie6, netscape and firefox. Opera seems to not work any way. You can only right click and use Save As. And I don't have IE7 to test with yet.mtporter wrote:wonderful!! works like a charm now!
replaced line 58 in icon.php to $attribs['target'] = "_blank";
wonderful
wonderful
works in FF and IE now.
I'm still curious however what the "consequences" might be, compared to this or using the code posted above by Nibblers or the fix on the Joomla Tracker page (link posted above), both of which I haven't tried yet. Anyone have any thoughts? By the way Nibblers, can't you upload your browser detection file as an attachment?
- adamos46
- Joomla! Explorer
- Posts: 275
- Joined: Sat Apr 26, 2008 6:05 am
- Location: New Jersey
Re: Blank pdf document generated
I noticed after upgrading to 1.5.6 the pdf output shows blank pages. the [target] _blank didnt solve it. FF & IE7 show blank pages.
-
- Joomla! Apprentice
- Posts: 36
- Joined: Wed Oct 04, 2006 6:03 am
Re: Blank pdf document generated
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:
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:
Replace the above with these two lines:JResponse::setHeader( 'Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', false );
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?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
Last edited by leeuniverse on Sun Aug 31, 2008 5:02 am, edited 5 times in total.
-
- Joomla! Apprentice
- Posts: 36
- Joined: Wed Oct 04, 2006 6:03 am
Re: Blank pdf document generated
hmmm.... My Firefox has alway's worked no matter which way, but not an upgraded Joomla, it's a fresh install.adamos46 wrote:I noticed after upgrading to 1.5.6 the pdf output shows blank pages. the [target] _blank didnt solve it. FF & IE7 show blank pages.
However, try the above fix. This may fix everyone's problems, though your problem might be due to "upgrading"?
- adamos46
- Joomla! Explorer
- Posts: 275
- Joined: Sat Apr 26, 2008 6:05 am
- Location: New Jersey
Re: Blank pdf document generated
Still.. it doesn't work. print/email work fine. PDF output is blank.
-adam
-adam
-
- Joomla! Apprentice
- Posts: 36
- Joined: Wed Oct 04, 2006 6:03 am
Re: Blank pdf document generated
Ya, don't know what to tell you then.... Working fine on my end. Do you have to anti-spyware popup blockers or anything running? Likely an obvious question, but who knows. Do you have Adobe installed? Try to do a fresh FULL install of 1.5.6 into another directory or domain or something and see what happens, to see if it's your upgrade or maybe something with your computer itself, or maybe even your webhosting. Maybe your permissions or webhosting is not properly set up? I use HostGator..... Do you have SEO activated?
- adamos46
- Joomla! Explorer
- Posts: 275
- Joined: Sat Apr 26, 2008 6:05 am
- Location: New Jersey
Re: Blank pdf document generated
I manage my own servers. I have two servers running Joomla 1.5.6. Permissions are fine. They were working fine 2 weeks ago. I will do a fresh install on a testing server and see if that is gonna solve it.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Sun Sep 02, 2007 6:14 pm
Re: Blank pdf document generated
I have several sites that have been updated to 1.5.6. I tried your code and all of them work correctly when clicking the PDF icon for the first time! Thanks so much for your help.
- adamos46
- Joomla! Explorer
- Posts: 275
- Joined: Sat Apr 26, 2008 6:05 am
- Location: New Jersey
Re: Blank pdf document generated
Damn it, I completely forgot. I had a new designer and I disabled cache on the testing servers. I enabled it and after 5 minutes it worked.
Thanks leeuniverse
-adam
Thanks leeuniverse
-adam
-
- Joomla! Apprentice
- Posts: 36
- Joined: Wed Oct 04, 2006 6:03 am
Re: Blank pdf document generated
Your welcome.... The real thanks however goes to the person in that one link that actually found the related solution.
But, it should have been on this forum already. Everyone should be having this issue.
But, it should have been on this forum already. Everyone should be having this issue.
-
- Joomla! Apprentice
- Posts: 12
- Joined: Tue Jun 03, 2008 1:09 pm
Re: Blank pdf document generated
Thanks. The above simple change worked. I appreciate it. Have a great day!gelauff wrote:Not very elegant but it works:
Backup: components/com_content/helpers/icon.php
Then on line 58 replace:with:Code: Select all
$attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return false;";
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.Code: Select all
$attribs['target'] = "_blank";
Hopefully the Joomla team will find the real solution.
-
- Joomla! Apprentice
- Posts: 36
- Joined: Wed Oct 04, 2006 6:03 am
Re: Blank pdf document generated
Dear friend.... Don't use "that" fix, use the proper one I posted.
Should work for you anyway.
Should work for you anyway.
- adamos46
- Joomla! Explorer
- Posts: 275
- Joined: Sat Apr 26, 2008 6:05 am
- Location: New Jersey
Re: Blank pdf document generated
leeuniverse: I dont know if you have this problem too but after the fix, when I click on the pdf it shows a blank screen. When I refresh, the pdf shows up ok. I tried to play with the cache and revalidate but it doesnt fix it.