elixir-pdf
elixir-pdf copied to clipboard
Why GenServer to hold the document?
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
@alappe I know this was some time ago, but would you be willing to share your version?
@Hermanverschooten sure, but it will take until next week due to holiday.
@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.
@alappe Thanks! Small question though, why did you change the name to PDF
?
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
Wasn't complaining, just wondering.
Alright :)