Highlighted

this.print is not working in chrome

New Here ,
Oct 13, 2020

Copy link to clipboard

Copied

I have a PDF file with buttons about every 10 pages that look like a printer icon.

When clicked they will print the entire section of that part of the PDF (about 10 pages).

It does this by printing page ranges.

The current code is looks like this with different page ranges in each button:

this.print({nStart: 9, nEnd: 20});

It works great when someone opens the PDF file in Adobe Reader.

The problem with this code is it doesn't work when someone opens the PDF file in a web browser.

TOPICS
How to, Print and prepress

Views

78

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

this.print is not working in chrome

New Here ,
Oct 13, 2020

Copy link to clipboard

Copied

I have a PDF file with buttons about every 10 pages that look like a printer icon.

When clicked they will print the entire section of that part of the PDF (about 10 pages).

It does this by printing page ranges.

The current code is looks like this with different page ranges in each button:

this.print({nStart: 9, nEnd: 20});

It works great when someone opens the PDF file in Adobe Reader.

The problem with this code is it doesn't work when someone opens the PDF file in a web browser.

TOPICS
How to, Print and prepress

Views

79

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 13, 2020 0
New Here ,
Oct 13, 2020

Copy link to clipboard

Copied

Please help me

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2020 0
Most Valuable Participant ,
Oct 13, 2020

Copy link to clipboard

Copied

We can't help you. Report this bug to the developers of the Chrome PDF plugin.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2020 0
New Here ,
Oct 13, 2020

Copy link to clipboard

Copied

 

I mean, after hitting the print button the below dialog is opening but the page numbers is not showing

 

ss.PNG

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2020 0
New Here ,
Oct 13, 2020

Copy link to clipboard

Copied

It is showing all pages instead of particular pages set in code

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2020 0
Most Valuable Participant ,
Oct 13, 2020

Copy link to clipboard

Copied

Report this bug to the developers of the Chrome PDF plugin.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2020 0
New Here ,
Oct 13, 2020

Copy link to clipboard

Copied

ok, I will  report but it happing with all browser

 

any alternate solution?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2020 0
Most Valuable Participant ,
Oct 13, 2020

Copy link to clipboard

Copied

Don't open the file in a browser. Almost all of them have sub-part PDF plugins.

Save it locally and then open it in Adobe Acrobat or Reader.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2020 0
Most Valuable Participant ,
Oct 13, 2020

Copy link to clipboard

Copied

There is one alternative way of doing it, though. Maybe they bothered implementing that one (although I doubt it). Try this code:

 

var pp = this.getPrintParams();
pp.printRange = [[9, 20]];
this.print(pp);

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2020 1
New Here ,
Oct 13, 2020

Copy link to clipboard

Copied

Thanks, I really appreciate it.

and it is working in adobe reader but when I tried the button in chrome then nothing happens.

you are a expert, please try it on your system and tell me it is working it or not.

if working then i did something wrong

 

please help me I need this 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2020 0
Most Valuable Participant ,
Oct 14, 2020

Copy link to clipboard

Copied

What you are doing wrong is assuming this is something to do with Adobe. No. Not any more. Today, Each browser maker has its own PDF viewer. Each has its own limits and bugs. You have to test each one. The chances of success are small. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 14, 2020 0
Most Valuable Participant ,
Oct 14, 2020

Copy link to clipboard

Copied

If you tried the code and it didn't work for you there's no point in me doing the same. As I said, it's not guaranteed to work anywhere beside (some) Adobe software.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 14, 2020 0
New Here ,
Oct 14, 2020

Copy link to clipboard

Copied

Please provide me any alternate solution.

 

Actually, I have taken a project on a freelancing website and the client needs this.

 

Please help me, it is a $15 project. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 14, 2020 0
Most Valuable Participant ,
Oct 14, 2020

Copy link to clipboard

Copied

So you want me to work for you for free, so you could earn money from a project you're not qualified to do in the first place? I don't think so.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 14, 2020 1
New Here ,
Oct 14, 2020

Copy link to clipboard

Copied

I don't mean it this way

I just want to not cancel the order because it will hammer my profile.

 

I can pass the amount of $20 for this if found any alternate solution.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 14, 2020 0
try67 LATEST
Most Valuable Participant ,
Oct 14, 2020

Copy link to clipboard

Copied

There is no alternate solution.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 14, 2020 0
Adobe Community Professional ,
Oct 14, 2020

Copy link to clipboard

Copied

Chrome is a spyware, you should not use it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 14, 2020 0