Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

PDF print not worki...
 
Notifications
Clear all

PDF print not working

12 Posts
2 Users
0 Reactions
10.6 K Views
(@jucamvil)
Posts: 9
Active Member
Topic starter
 
[#630]

Hi.

When I try to use the Export to PDF button it doesnt work.

For instance, from projects Menu, I click on pdf buttond and It opens the page: http://MyDomain/projectorria/view/print.php?print=true&page=../tool/jsonQuery.php&objectClass=Project&objectId=&outMode=pdf&objectType=%20
But It doesnt create the pdf file

I have the 2.4.3 version

Thanks,

Juan


 
Posted : 21 Aug 2012 9H42
(@babynus)
Posts: 14952
Member Admin
 

Did you try to export to PDF the list of projects of the detail of a project ?
Did you try to wait a bit ? (pdf generation may take some time)
Can you check your log file and copy here any issue reported ?


 
Posted : 21 Aug 2012 14H06
(@jucamvil)
Posts: 9
Active Member
Topic starter
 

Did you try to export to PDF the list of projects of the detail of a project ? The project list and the detail. It was an example, because It happens everywhere with the PDF button.
Did you try to wait a bit ? (pdf generation may take some time) Yes.
Can you check your log file and copy here any issue reported ? No issues:
2012-08-21 08:03:53 ===== TRACE ===== NEW CONNECTED USER 'jvillamizar'


 
Posted : 21 Aug 2012 17H06
(@babynus)
Posts: 14952
Member Admin
 

Strange :huh:

Which browser / version are you using ?
Did you try another another version ?
Can you try same thing on Demo ? What is the result ?

Thanks.


 
Posted : 21 Aug 2012 22H10
(@jucamvil)
Posts: 9
Active Member
Topic starter
 

Strange :huh:

Which browser / version are you using ? FF 14.0.1 - Chrome 21 IE 9
Did you try another another version ?
Can you try same thing on Demo ? What is the result ? It works.

Thanks.


 
Posted : 22 Aug 2012 0H56
(@jucamvil)
Posts: 9
Active Member
Topic starter
 

I see URL is not getting the ObjectId parameter....

 http://172.16.11.209/projectorria/view/print.php?print=true&page=../tool/jsonQuery.php&objectClass=Alert&objectId=&outMode=pdf 

 
Posted : 22 Aug 2012 1H02
(@babynus)
Posts: 14952
Member Admin
 

Which browser / version are you using ? FF 14.0.1 - Chrome 21 IE 9

So, it does not seem to be browser based issue...

Can you try same thing on Demo ? What is the result ? It works.

So sure it is a server based issue.
What is you server : is it a local install, a server on your own or a hosted server ?
Pay attention to some free hosting services that include adds to your pages : they modify the http response, and pdf pages will possibly not be displayed from these servers.

I see URL is not getting the ObjectId parameter...

It's not an issue : objectId is not set if you print the list.


 
Posted : 22 Aug 2012 14H01
(@jucamvil)
Posts: 9
Active Member
Topic starter
 

What is you server :

It is a local server (Windows Server 2008 R2 - WAMP). Everything works like a charm, excepting for the PDF option.
Maybe Am I missing any configuration? or permissions?


 
Posted : 22 Aug 2012 17H59
(@babynus)
Posts: 14952
Member Admin
 

Could you try :
- open Firefox or Chrome, with console opened
- in user parameters screen, select "pdf export in new wintdow to" "Yes"
- generated pdf

=> does the new window open ?
=> do you get a response from server or is the browser waiting for resonse ?
=> if you get a response, what is it ? can you post here the header of the response ?

Thanks.


 
Posted : 22 Aug 2012 22H30
(@jucamvil)
Posts: 9
Active Member
Topic starter
 

Could you try :
- open Firefox or Chrome, with console opened
- in user parameters screen, select "pdf export in new wintdow to" "Yes"
- generated pdf

=> does the new window open ? Yes. Always.
=> do you get a response from server or is the browser waiting for resonse ? I get response. Blank page shown in 108ms
=> if you get a response, what is it ? can you post here the header of the response ?
Header:
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0Connection:Keep-AliveContent-Length:0Content-Type:text/htmlDate:Wed, 22 Aug 2012 20:39:48 GMTExpires:Thu, 19 Nov 1981 08:52:00 GMTKeep-Alive:timeout=5, max=99Pragma:no-cacheServer:Apache/2.2.22 (Win64) PHP/5.3.13X-Powered-By:PHP/5.3.13

Thanks.


 
Posted : 23 Aug 2012 0H41
(@babynus)
Posts: 14952
Member Admin
 

You have a header issue.
Here is the header I get :

HTTP/1.1 200 OK
Date: Sat, 25 Aug 2012 14:12:11 GMT
Server: Apache/2.2.21 (Win32) PHP/5.3.9
X-Powered-By: PHP/5.3.9
Expires: Sat, 26 Jul 1997 05:00:00 GMT
Cache-Control: public, must-revalidate, max-age=0
Pragma: public
Last-Modified: Sat, 25 Aug 2012 14:12:12 GMT
Content-Length: 601552
Content-Disposition: inline; filename="document.pdf";
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/pdf

You should try from demo : you should get the same header.
What is most important is the Content-Type, that should be application/pdf; yours is text/html. As you recieve some pdf format, your browser cannot translate this into html and displays a blank page.

You must check your web browser, it must automatically change the header depneding on extension of page name : he automatically assumes to be htms/text because page name extension is .php


 
Posted : 25 Aug 2012 18H18
(@babynus)
Posts: 14952
Member Admin
 

If you use apache, header content-type can be automatically changes from mime.type configuration file :
text/html php

Remove the .php extension.
Restart your web server and test again : it should work better, as apache will keep the defined content-type


 
Posted : 25 Aug 2012 18H38
Share:

Scroll to Top