Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to print whole page containing pdfs at once?

Posted on 2012-04-04
9
Medium Priority
?
302 Views
Last Modified: 2012-04-15
Hi Experts!

As in title, I want to print a page containing pdf files, images, text etc. at once with one print button, for now when I print the page, it prints everything except pdf files, then I have to print each pdf individually and it's not easy with 20 or 30 pdfs. I don't know how to do this, but maybe drop all the files into php array or do it with javascript somehow?

Thanks for any help.
0
Comment
Question by:Zado
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 1

Expert Comment

by:ajbarron
ID: 37806671
Can you select all the files you want printed and then right click > print?
0
 
LVL 8

Author Comment

by:Zado
ID: 37806731
No, it doesn't work that way, I tried. I'm looking for a button solution, I mean: click 'print' button (javascript or html one) and then everything prints included pdfs.
0
 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37806742
0
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

 
LVL 8

Author Comment

by:Zado
ID: 37806776
Thanks Lalit, but it doesn't work for pdfs.
Guys, I'm more interested in printing the multiple pdfs here than print button itself.
0
 
LVL 35

Accepted Solution

by:
gr8gonzo earned 2000 total points
ID: 37807121
The short answer is you can't do exactly what you're asking for, but you could probably come pretty close.

Each PDF and the web page are all individual objects that each require their own "print" command. The web page is printed via the web browser's layout engine, while the PDFs are printed via Acrobat Reader (or other installed PDF reader), so it's impossible to have one click invoke all the print jobs via one print prompt.

Even if you could pop up the print prompts for everything all at once, you'd end up with 30 printing prompts, which is not user-friendly (the printer queue receives print jobs one at a time).

However, I understand you want to reduce the amount of printing, so what you COULD do to dramatically improve the user experience is to offer a button that provides them with a single PDF that contains ALL of the other PDFs merged together.

Then you could use PHP to merge all your PDFs into one document and then provide that one to the user to download/print:

PDF Merge Solution #1:
http://neo22s.com/concatenate-pdf-in-php/

PDF Merge Solution #2:
http://stackoverflow.com/questions/1630016/creating-a-new-pdf-by-merging-pdf-documents-using-tcpdf-php (check out the bottom comment that talks about Zend PDF)

I would also recommend against trying to FORCE/auto-start the print job (in case you were thinking about it). There are a lot of PDF-capable devices that do not support printing, or computers with their default printers set incorrectly. It's the equivalent of putting a music / MIDI file on a web page and have it automatically start playing. It's a bad user experience - it's far better to give the -capabilities- to the user and let them do their own printing.
0
 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37807251
yes, gr8gonzo is absolutely RIGHT.
You can instruct other objects/components to initiate Print action from inside the another component (i.e Web Browser).
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37809893
Please post a link to the page you want to print.  I'd like to see what the HTML shows us.  Thanks, ~Ray
0
 
LVL 8

Author Closing Comment

by:Zado
ID: 37849299
Thanks :-)
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37849346
No link, eh?  It's so much easier to help you if we can get the answers to questions we ask you.  Best of luck with your project, ~Ray
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question