webERP Forum
Display option along with PDF print - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (/forumdisplay.php?fid=8)
+--- Thread: Display option along with PDF print (/showthread.php?tid=2087)

Pages: 1 2


Display option along with PDF print - newuser990 - 02-06-2014 01:45 AM

Hi,
Is it possible to add a "display" option in reports so that every time a PDF does not get downloaded.
its a good option when we just have to have a look at the reports.
Thanks


RE: Display option along with PDF print - arronlee - 03-06-2014 12:30 PM

Hi, newuser990.
Why not try to build a 3rd party
PDF viewer to help with the "PDF displaying"? I suggest you select some professional PDF Toolkits whose way of processing is simple and fast to help you. It can be much more convenient. Google it and select one to have a try. I hope you success. Good luck.



Best regards,
Arron



RE: Display option along with PDF print - newuser990 - 03-08-2014 07:00 PM

Dear Arron,

I have a PDF viewer. I meant to say that instead of always downloading a PDF, some places it is best if it just displays on screen. Like when I just have to have a glance some category of stock, then in the "inventory Quantities" it should allow me to just view on screen rather than download a pdf and then open it.


RE: Display option along with PDF print - Exsonqu_Qu - 03-09-2014 11:39 AM

Hi,

The best solution should be to code an html view interface for your requirements. Currently, most PDF files are set to download instead of review because the Main Menu interface will be disappear when we review PDF files in browser. And a back option is forbidden usually. Then users have to manually change the http link.
Best regards´╝ü

Exson


RE: Display option along with PDF print - Forums - 03-09-2014 05:52 PM

We could use the css media attribute so that when displayed on the screen it shows a normal webERP screen complete with header data and footer, and when displayed on a printer it hides everything but the data table. This means that with hardly any change to the code every data table that is shown in weberp becomes a printable report.

Tim


RE: Display option along with PDF print - newuser990 - 03-10-2014 10:07 PM

I think Tim's suggestion is good.
Or may be it can open the HTML view in a separate Tab of the browser if the Header & Footer is too much to incorporate.
I think it will be a really usefull option for a lot of users.


RE: Display option along with PDF print - Forums - 03-11-2014 03:10 AM

It's very easy to do, just change line 40 of includes/header.inc to:

echo '<link href="' . $RootPath . '/css/'. $_SESSION['Theme'] .'/default.css" media="screen" rel="stylesheet" type="text/css" />';

and immediately after it add the line

echo '<link href="' . $RootPath . '/css/default.css" media="print" rel="stylesheet" type="text/css" />';

then create the css file css/default.css where only the tables are set to visible and everything else is hidden. Then when you do a print page in your browser only the tables should get shown.

Tim


RE: Display option along with PDF print - Exsonqu_Qu - 03-12-2014 04:58 PM

Hi, Dear all,

I think it's only workable for those which has html table. But usually, those scripts create pdf file has no html table. That means the css created have no place to apply.

Am I missing something?

Best regards!

Exson


RE: Display option along with PDF print - Forums2 - 03-12-2014 08:33 PM

Well using this technique we would use the same code for displaying on the screen as printing to paper, or outputting to pdf. This will make the code easier to change for people who want to amend reports, and make the generation of reports quicker to do. Seemed good to me :-) It xsimplifies the code, makes it more readable, and makes it faster. What could be better?

Tim


RE: Display option along with PDF print - newuser990 - 03-14-2014 09:08 PM

Dear Tim,
I tried making the changes that you mentioned but could not get it to work.
It still downloads a PDF.