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

Why GenServer to hold the document? #25

Open
alappe opened this issue Mar 9, 2021 · 7 comments
Open

Why GenServer to hold the document? #25

alappe opened this issue Mar 9, 2021 · 7 comments

Comments

@alappe
Copy link

alappe commented Mar 9, 2021

Dear Andrew,

thanks for starting this package – much appreciated. While converting an old pdf over to your library, I wondered why the document is hold inside a GenServer? I read through it and even converted a local version to return the %Document{} instead of a pid(), all working fine.

I do see a benefit for holding fonts and objects though.

Regards
Andreas

@Hermanverschooten
Copy link
Contributor

@alappe I know this was some time ago, but would you be willing to share your version?

@alappe
Copy link
Author

alappe commented Jan 19, 2023

@Hermanverschooten sure, but it will take until next week due to holiday.

@alappe alappe closed this as completed Jan 19, 2023
@alappe alappe reopened this Jan 19, 2023
@alappe
Copy link
Author

alappe commented Jan 24, 2023

@Hermanverschooten Sorry, I forgot it's on github anyway:

https://github.com/zimmer7/elixir-pdf/tree/document_without_process

This is the branch I'm using in one project.

@Hermanverschooten
Copy link
Contributor

@alappe Thanks! Small question though, why did you change the name to PDF?

@alappe
Copy link
Author

alappe commented Jan 25, 2023

I can't recall, probably because it worked and that's the usual writing of the format. This complicates merging – sorry for that!

Looking into it, I wasn't really that wrong: https://hexdocs.pm/elixir/1.12/naming-conventions.html#casing

@Hermanverschooten
Copy link
Contributor

Wasn't complaining, just wondering.

@alappe
Copy link
Author

alappe commented Jan 25, 2023

Alright :)

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

2 participants