Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display option along with PDF print
02-06-2014, 01:45 AM
Post: #1
Display option along with PDF print
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
Find all posts by this user
Quote this message in a reply
03-06-2014, 12:30 PM
Post: #2
RE: Display option along with PDF print
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
Find all posts by this user
Quote this message in a reply
03-08-2014, 07:00 PM
Post: #3
RE: Display option along with PDF print
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.
Find all posts by this user
Quote this message in a reply
03-09-2014, 11:39 AM
Post: #4
RE: Display option along with PDF print
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
Find all posts by this user
Quote this message in a reply
03-09-2014, 05:52 PM
Post: #5
RE: Display option along with PDF print
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
Visit this user's website Find all posts by this user
Quote this message in a reply
03-10-2014, 10:07 PM
Post: #6
RE: Display option along with PDF print
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.
Find all posts by this user
Quote this message in a reply
03-11-2014, 03:10 AM
Post: #7
RE: Display option along with PDF print
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
Visit this user's website Find all posts by this user
Quote this message in a reply
03-12-2014, 04:58 PM
Post: #8
RE: Display option along with PDF print
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
Find all posts by this user
Quote this message in a reply
03-12-2014, 08:33 PM
Post: #9
RE: Display option along with PDF print
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
Find all posts by this user
Quote this message in a reply
03-14-2014, 09:08 PM
Post: #10
RE: Display option along with PDF print
Dear Tim,
I tried making the changes that you mentioned but could not get it to work.
It still downloads a PDF.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: