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.
zeebeest
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sun Sep 24, 2006 7:07 am

Blank pdf document generated

Post by zeebeest » Wed Feb 13, 2008 4:58 pm

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

hewie
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Feb 14, 2008 3:09 am

Re: Blank pdf document generated

Post by hewie » Thu Feb 14, 2008 3:51 am

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

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

zeebeest
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sun Sep 24, 2006 7:07 am

Re: Blank pdf document generated

Post by zeebeest » Thu Feb 14, 2008 4:27 pm

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... ;D

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

User avatar
diver165
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 105
Joined: Sun Jun 24, 2007 6:12 pm

Re: Blank pdf document generated

Post by diver165 » Fri Feb 15, 2008 3:26 pm

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.

hewie
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Feb 14, 2008 3:09 am

Re: Blank pdf document generated

Post by hewie » Fri Feb 15, 2008 4:12 pm

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.

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>
Any ideas how I can get this damn pdf button to work?

tuvix72
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Feb 19, 2008 12:45 am

Re: Blank pdf document generated

Post by tuvix72 » Tue Feb 19, 2008 1:12 am

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

tuvix72
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Feb 19, 2008 12:45 am

Re: Blank pdf document generated

Post by tuvix72 » Tue Feb 19, 2008 2:14 am

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

User avatar
gelauff
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Oct 16, 2007 1:19 pm
Location: Grenoble, FRANCE
Contact:

Re: Blank pdf document generated

Post by gelauff » Tue Feb 19, 2008 2:47 pm

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.
Problem is a wrong word for solution.

tuvix72
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Feb 19, 2008 12:45 am

Re: Blank pdf document generated

Post by tuvix72 » Tue Feb 19, 2008 3:17 pm

Beautiful! That worked just fine, thank you!!

zeebeest
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sun Sep 24, 2006 7:07 am

Re: Blank pdf document generated

Post by zeebeest » Tue Feb 19, 2008 4:22 pm

Thank you :) :)

hewie
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Feb 14, 2008 3:09 am

Re: Blank pdf document generated

Post by hewie » Tue Feb 19, 2008 5:02 pm

Interesting! That fix results in the original small pop-up window with the pdf for me (IE7). :o

That's great! Thanks to Grenoble.

tuvix72
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Feb 19, 2008 12:45 am

Re: Blank pdf document generated

Post by tuvix72 » Tue Feb 19, 2008 5:15 pm

hewie wrote:Interesting! That fix results in the original small pop-up window with the pdf for me (IE7). :o

That's great! Thanks to Grenoble.
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! ;D

User avatar
gelauff
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Oct 16, 2007 1:19 pm
Location: Grenoble, FRANCE
Contact:

Re: Blank pdf document generated

Post by gelauff » Wed Feb 20, 2008 6:44 am

hewie wrote:Interesting! That fix results in the original small pop-up window with the pdf for me (IE7). :o

That's great! Thanks to Grenoble.
A few lines above there are definitions for the popup window, which are appearantly read by your browser.
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.

Nibblers
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Nov 23, 2006 7:52 pm

Re: Blank pdf document generated

Post by Nibblers » Wed Aug 06, 2008 8:47 pm

I've got a solution to this (thanks to Ed)

You need a file:

Code: Select all

browser_detection.php 
I can send you this by e-mail. Please request at [email protected]

Extract and upload in to

Code: Select all

libraries/joomla/utilities/
Now find

Code: Select all

ICON.PHP
in

Code: Select all

components/com_content/helpers/
Place this

Code: Select all

require_once("libraries/joomla/utilities/browser_detection.php");
in line 2

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;";
      }
That should cure the problem!

Simon

waader
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Fri Aug 19, 2005 3:59 pm

Re: Blank pdf document generated

Post by waader » Thu Aug 07, 2008 7:58 am

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.

Nibblers
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Nov 23, 2006 7:52 pm

Re: Blank pdf document generated

Post by Nibblers » Thu Aug 07, 2008 9:46 am

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

mtporter
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Sun Aug 03, 2008 11:57 am

Re: Blank pdf document generated

Post by mtporter » Thu Aug 07, 2008 11:01 am

wonderful!! works like a charm now!

replaced line 58 in icon.php to $attribs['target'] = "_blank";

wonderful
wonderful

works in FF and IE now.

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

Re: Blank pdf document generated

Post by leeuniverse » Sat Aug 30, 2008 10:28 pm

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.
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.

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?

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 Aug 30, 2008 10:50 pm

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.

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

Re: Blank pdf document generated

Post by leeuniverse » Sat Aug 30, 2008 10:57 pm

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?
Last edited by leeuniverse on Sun Aug 31, 2008 5:02 am, edited 5 times in total.

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

Re: Blank pdf document generated

Post by leeuniverse » Sat Aug 30, 2008 11:01 pm

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.
hmmm.... My Firefox has alway's worked no matter which way, but not an upgraded Joomla, it's a fresh install.
However, try the above fix. This may fix everyone's problems, though your problem might be due to "upgrading"?

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 » Sun Aug 31, 2008 5:19 am

Still.. it doesn't work. print/email work fine. PDF output is blank.


-adam

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

Re: Blank pdf document generated

Post by leeuniverse » Sun Aug 31, 2008 5:53 am

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?

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 » Sun Aug 31, 2008 3:37 pm

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.

Transonic
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Sep 02, 2007 6:14 pm

Re: Blank pdf document generated

Post by Transonic » Tue Sep 02, 2008 6:58 pm

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. :)

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 02, 2008 7:39 pm

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

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 03, 2008 1:20 am

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.

AbyssLLC
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Jun 03, 2008 1:09 pm

Re: Blank pdf document generated

Post by AbyssLLC » Wed Sep 03, 2008 2:06 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.
Thanks. The above simple change worked. I appreciate it. Have a great day! :D
Best Regards,

Jennifer Mitchell
Abyss L.L.C.
http://www.abyss.com

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 03, 2008 4:40 am

Dear friend.... Don't use "that" fix, use the proper one I posted.
Should work for you anyway.

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:36 pm

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.


Locked

Return to “Administration 1.5”