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

New page support/ Page break #8

Open
harsh-haria opened this issue Dec 17, 2022 · 3 comments
Open

New page support/ Page break #8

harsh-haria opened this issue Dec 17, 2022 · 3 comments
Assignees

Comments

@harsh-haria
Copy link
Contributor

Feature Description

  • Whenever I try to create a new pdf from html, pdf-node works like a charm.
  • However, there are cases where I want to add multiple pdf pages in a single document.
  • If I'm not wrong, as of now there is no method to create new pages in this library itself.
  • It would be great if we could add a function to simply break the pdf page and start with new one.

Feature Implementation

  • Just like the page break we do in 'Google Docs' or 'Microsoft Word' we can add some functionality that helps us to start on the new page every time that function is called.

Example:

document.addNewPage();
p.s. Let me know if I missed anything or mentioned anything wrong. Thanks a lot :)
@tawseefnabi tawseefnabi pinned this issue Dec 19, 2022
@harsh-haria
Copy link
Contributor Author

I would like to work on this. Can you assign it to me?

@harsh-haria
Copy link
Contributor Author

I was thinking we could accept the document as a single document or an array. the user can choose either of the options.
Then compile the html for each one of them if in array or just compile the single file.
Then merge them all in one single pdf and then return the output to the user.
does that sound good for the feature?
let me know your thoughts,

ps: I was refering to the first parameter over here when i mentioned document in the first line
pdf(document, options)
  .then((res) => {
    console.log(res);
  })
  .catch((error) => {
    console.error(error);
  });

@harsh-haria
Copy link
Contributor Author

@tawseefnabi what are your thoughts on this?

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

1 participant