andrewtimberlake / elixir-pdf

An attempt to get a nice API for PDF generation in Elixir
MIT License
94 stars 15 forks source link

With PDF can define the PDF version and keep it for example in version 1.3? #50

Open developertrinidad08 opened 2 months ago

developertrinidad08 commented 2 months ago

Hello everyone I have the following problem: PDF returns the file in version 1.7 by default and I need it in previous versions, more specifically in 1.3. Is it possible to specify the version of the PDF so that it directly creates it in the version I need? Or is it something I have to do with another library?

andrewtimberlake commented 2 months ago

Right now it’s hard-coded but it could be variable (I’ll have to check the spec on the other hard-coded header data). Out of interest, why do you need it to be 1.3?

developertrinidad08 commented 2 months ago

Andrew, thank you very much for taking the time to answer my question.

The reason is that I'm making an app that prints reports from a client. The problem I found is that there are very few printers that support sending a PDF version 1.7 directly to them. Version 1.3 is the standard that printers support and that's the reason why I need to use that version.

I've currently tried using Ghostscript to change the PDF version, but for some reason this increases the printing delay a lot It goes from taking 30 seconds to 2 or 3 minutes.

andrewtimberlake commented 2 months ago

@developertrinidad08 I have enabled a compile time version setting 19de6f3 and documented it in the README

developertrinidad08 commented 2 months ago

andrew thank you very much ... !!! I will try it as soon as possible