Restricting user to only print certain amount of pages

New Here ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

Using Adobe Embed PDF API, would it be possible to restrict the user to only print few of the pages from the whole pdf while clicking print from the adobe toolbar?

TOPICS
PDF Embed API

Views

99

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
community guidelines
Community Expert ,
Jul 12, 2021 Jul 12, 2021

Copy link to clipboard

Copied

We don't support that feature at this time. Can you elaborate on exactly what you want to have happen when the user goes to print? Is it always the exact same set of pages within the PDF?

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
community guidelines
New Here ,
Jul 12, 2021 Jul 12, 2021

Copy link to clipboard

Copied

We have a use case where we only allow the user to print next 10 pages from the current page within the pdf. So the set of pages will be different each time the user hits the print.

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
community guidelines
Community Expert ,
Jul 12, 2021 Jul 12, 2021

Copy link to clipboard

Copied

Ok - And since they are printing, they get to keep the output or file since they can "print" to PDF. Is that correct? If so, we do have a solution that might work.

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
community guidelines
New Here ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

Hi there,

 

Yes, they will have the option to keep the output of that print event.

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
community guidelines
New Here ,
Jul 19, 2021 Jul 19, 2021

Copy link to clipboard

Copied

@Joel_Geraci Could you provide the details of that solution you talked about in your last comment or is there any ETA if it is currently in progress?

 

Thanks,

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
community guidelines
Community Expert ,
Jul 19, 2021 Jul 19, 2021

Copy link to clipboard

Copied

Thanks for the reminder.

 

Using Embed API, you can detect what page the user is on. You can also add a button that would allow them to download and print that page plus the following 9 pages or to the end. When the button is pressed, the original file gets sent to our PDF Services Extract API using the current page as the start parameter and then whatever number of pages they are entitled to as the second parameter. You could then secure the file using the Protect API so that the resulting file couldn't be combined with other requests to "print".

 

Essentially, instead of printing a selection of pages, you generate a new file on-demand with just the pages you need. 

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
community guidelines
New Here ,
Jul 19, 2021 Jul 19, 2021

Copy link to clipboard

Copied

Hi there,

Based on your suggestion, it seems like there is an option to control the print event. Could you able to provide the documentation for the code for passing the start page and last page parameters in PDF Services API? I wasn't able to find anything in PDF Services or PDF API Docs.

 

Also, I was looking for something like adding a callback to this "Print PDF" button inside the Embed PDF API? print_pdf_button.png 

 

To simplify, the roadmap would likely be:

initiating print event(by print pdf button) callback > preparing a page deck by using getCurrentPage from getAPIs() and next 9 pages or to the end  > passing the start parameter and last page parameter.

 

Thanks for all of this. Your help is much appreciated.

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
community guidelines
Community Expert ,
Jul 19, 2021 Jul 19, 2021

Copy link to clipboard

Copied

LATEST

Actually, you can't control print from inside Embed API, you can only disable it which is my recommendation. You'd add your own "print" button in your application chrome around Embed API that gets the current page then calls the other APIs.

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
community guidelines
Resources