QuestPDF / QuestPDF

QuestPDF is a modern open-source .NET library for PDF document generation. Offering comprehensive layout engine powered by concise and discoverable C# Fluent API. Easily generate PDF reports, invoices, exports, etc.
https://www.questpdf.com
Other
11.67k stars 608 forks source link

Full Page Border with Header, Content, and Footer Inside #955

Open Dip-dattani opened 2 months ago

Dip-dattani commented 2 months ago

I am writing to request a new feature for QuestPDF that I believe would be highly beneficial for users who require a more structured and visually appealing document layout.

I request the ability to add a full-page border to a document. It should be possible to include a page header, page content, and a page footer inside this border. The layout would look something like this:

A border surrounds the entire page. Inside the border, there is a header section at the top. Below the header, is the main content area. At the bottom, a footer section.

Currently, it is not possible to add a full-page border within the Compose method directly. If we create a separate component to achieve this, we must call the header and footer from within the component, which prevents the header and footer from rendering correctly on subsequent pages. This limitation significantly affects the layout and usability of the document.

MarcinZiabek commented 2 months ago

Have you tried implementing your requirement using the watermark slots? 😄 Their content appears below and on top of the entire page. Possibly, this functionality is sufficient for your needs: https://www.questpdf.com/api-reference/page.html#watermark-slots