danfickle / openhtmltopdf

An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!
https://danfickle.github.io/pdf-templates/index.html
Other
1.93k stars 359 forks source link

Only First PDF page #860

Open rider87 opened 2 years ago

rider87 commented 2 years ago

Hi,

How can I have in the output only the first page from the PDF?

Is there something which I missed? PdfRendererBuilder builder = new PdfRendererBuilder(); ....

lindadev77 commented 1 year ago

Hi,

How can I have in the output only the first page from the PDF?

Is there something which I missed? PdfRendererBuilder builder = new PdfRendererBuilder(); ....

Maybe you can get by this: builder.useInitialPageNumber(0);