Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Create a PDF based on template to display a large data file #42

Open
azamss opened this issue May 29, 2023 · 3 comments
Open

Create a PDF based on template to display a large data file #42

azamss opened this issue May 29, 2023 · 3 comments

Comments

@azamss
Copy link

azamss commented May 29, 2023

https://gist.github.com/azamss/4c0dbea4c7c79af97f54e827f7a8ff5d

I have a file whose number of lines is more than one page. Using the sample code that I linked, I was able to create only one PDF page but i want to display all data. How can I solve this problem?

@azamss azamss changed the title Create a PDF template file to read a large file Create a PDF based on template to display a large data file May 29, 2023
@sbinet
Copy link
Contributor

sbinet commented Jun 5, 2023

@azamss
Copy link
Author

azamss commented Jun 7, 2023

No, I use the table to display the data inside the file.
The link below is an example of a file
https://gist.github.com/azamss/5988663277c52ffc8497fc94ef61e0d1

@neox5
Copy link

neox5 commented Apr 16, 2024

I think you have 2 possiblities:

  1. pre-calculate the height of all the text when rendered and insert the pdf.AddPage() accordingly.
  2. or calculate the rest of the page and necessary height of the text block. If height exseeds the rest of the page add new page

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

No branches or pull requests

3 participants