Jump to content

Hello! Im making a page that supposed to act kinda like a pdf printer, here's my idea:

User puts 10 pdfs inside same folder as html, html is dragged into browser, it finds and shows the pds side by side with iframe,

then you have input boxes on each iframe asking how many of the pdfs you want. then you click a button and it prints how many you want of them all.

i have googled for a good good while.

and the problem is that i will be running chrome os. i cannot add plugins due to my system adminstrator does not allow this.

 

Please suggest code ?

Thanks for any suggestions! ?

 

Link to comment
https://linustechtips.com/topic/1104960-html-print-multiple-pdf-files-at-once/
Share on other sites

Link to post
Share on other sites

3 hours ago, ughiwanthackintosh said:

Hello! Im making a page that supposed to act kinda like a pdf printer, here's my idea:

User puts 10 pdfs inside same folder as html, html is dragged into browser, it finds and shows the pds side by side with iframe,

then you have input boxes on each iframe asking how many of the pdfs you want. then you click a button and it prints how many you want of them all.

i have googled for a good good while.

and the problem is that i will be running chrome os. i cannot add plugins due to my system adminstrator does not allow this.

 

Please suggest code ?

Thanks for any suggestions! ?

 

I suggest you use flexboxes instead of iframes. (here's a really neat cheet sheet : https://css-tricks.com/snippets/css/a-guide-to-flexbox/)
I don't see why you would want to go through a browser when you can simply open the pdfs with say Edge and print from there.

Unless you are making an interactive page with PHP in the background to swap the pdfs around..

I don't think you can multi print like that regardless. since the user will be prompt with the request to print for each document (though maybe it can do it in sequence. but that would be kinda clumsy anyway)

~New~  BoomBerryPi project !  ~New~


new build log : http://linustechtips.com/main/topic/533392-build-log-the-scrap-simulator-x/?p=7078757 (5 screen flight sim for 620$ CAD)LTT Web Challenge is back ! go here  :  http://linustechtips.com/main/topic/448184-ltt-web-challenge-3-v21/#entry601004

Link to post
Share on other sites

3 minutes ago, givingtnt said:

I suggest you use flexboxes instead of iframes. (here's a really neat cheet sheet : https://css-tricks.com/snippets/css/a-guide-to-flexbox/)
I don't see why you would want to go through a browser when you can simply open the pdfs with say Edge and print from there.

Unless you are making an interactive page with PHP in the background to swap the pdfs around..

I don't think you can multi print like that regardless. since the user will be prompt with the request to print for each document (though maybe it can do it in sequence. but that would be kinda clumsy anyway)

so there is no way?

also as i mentioned im going to use chrome so. there is no edge browser.

Link to post
Share on other sites

use a javascript pdf library like https://github.com/MrRio/jsPDF for example. or  https://mozilla.github.io/pdf.js/

 

 

no need for iframes... you can use javascript to add file selection boxes to a form or make previously hidden boxes visible and then read the file names with javascript, open the files ...

think of it as extracting pages from pdf, and adding pages to a temporary pdf on the fly then render everything as html and send the print command

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×