Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we limit PDF pages? #1077

Closed
Vicky099 opened this issue Sep 24, 2023 · 1 comment
Closed

Can we limit PDF pages? #1077

Vicky099 opened this issue Sep 24, 2023 · 1 comment

Comments

@Vicky099
Copy link

Hello All,

I want to generate a PDF with only one page and ignore the rest of the pages. My first page might be override to second page but in that case I want to ignore that second page. Is it possible using Wicked_pdf?

@unixmonkey
Copy link
Collaborator

You can generate the PDF normally, then pass the PDF file or blob into another tool, like PDFtk to copy off the first page into another PDF like pdftk wicked_pdf_multipage.pdf cat 1 output single_page.pdf.

I think you could also use Prawn-templates to do this, as I've done something similar in the past, back when templates were part of Prawn core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants