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

CiceroMark -> PDF transformation #51

Closed
dselman opened this issue Oct 4, 2019 · 10 comments
Closed

CiceroMark -> PDF transformation #51

dselman opened this issue Oct 4, 2019 · 10 comments
Assignees
Labels
Difficulty: Medium Good First Issue :octocat: Good for newcomers Help Wanted 🆘 Extra attention is needed Type: Feature Request 🛍️ New feature or request

Comments

@dselman
Copy link
Contributor

dselman commented Oct 4, 2019

Implement a transformation (similar to the markdown-html HtmlTransformer) that generates a PDF document from a CiceroMark DOM.

Describe the solution you'd like
Implement a visitor using the https://pdfkit.org library, generating paragraphs and formatted text.

Describe alternatives you've considered
Tried to fine a lightweight HTML -> PDF library (pure JS) but come up empty.

Additional context
Something small, fast and lightweight that is 100% JS. A bonus would be the ability to customise look and feel etc.

@dselman dselman added Difficulty: Medium hacktoberfest-accepted by DigitalOcean and DEV Help Wanted 🆘 Extra attention is needed Type: Feature Request 🛍️ New feature or request labels Oct 4, 2019
@peterhunn
Copy link
Member

@dagolinuxoid
Copy link

@peterhunn it's a pretty cool pdf generator.

@devcer
Copy link

devcer commented Oct 18, 2019

Hey, I would like to take this up. Can you help me get started with this?

@jolanglinais
Copy link
Member

@devcer I believe @dselman would be the best to give you a bit of guidance on this one.

@dselman
Copy link
Contributor Author

dselman commented Oct 22, 2019

Both pdfkit and jsPDF look like active projects in widespread use, and both MIT licensed. I don't have a strong preference for one or the other -- as long as they work in a Node.js environment. Having both Node.js and webpage usage would be even better.

I suggest playing with the API and looking at the output and performance and posting back findings here.

@jolanglinais
Copy link
Member

@devcer any progress on this?

@mttrbrts mttrbrts removed the hacktoberfest-accepted by DigitalOcean and DEV label Nov 1, 2019
@dselman
Copy link
Contributor Author

dselman commented Dec 12, 2019

Another one: https://www.npmjs.com/package/markdown-pdf

@Anubhavshakya
Copy link

@irmerk Can I work on this issue ?

@dselman
Copy link
Contributor Author

dselman commented Jun 19, 2020

https://github.com/bpampuch/pdfmake

Takes a declarative approach, which could make this really easy. We just have to transform the CiceroMark DOM into the JSON used by pdfmake.

@dselman
Copy link
Contributor Author

dselman commented Jul 7, 2020

Implemented by #243

@dselman dselman closed this as completed Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Medium Good First Issue :octocat: Good for newcomers Help Wanted 🆘 Extra attention is needed Type: Feature Request 🛍️ New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants