dragotin / kraft

Kraft helps to handle your daily quotes and invoices in your small business.
http://volle-kraft-voraus.de
GNU General Public License v2.0
60 stars 19 forks source link

Feature request (extending #156). Make the external call for the HTML -> PDF handler a configurable parameter #157

Closed noseshimself closed 2 years ago

noseshimself commented 2 years ago

https://github.com/dragotin/kraft/issues/156 was a stupid solution to the problem.

it might be simpler to add a new parameter to the Kraft-configuration file like

PrintHandler = [path to]weasyprint %s %d %i

(%s source, %d destination, %i CSS includes) and users can add debugging flags (or entire pipelines) in any form they like. The work involved is probably about the same order of magnitude.

Andnow the really elegant part: If you really insist on swapping out the typesetting engine, you could easily replace Weasyprint by about any other printsetting engine you like. Even using Paged.js should be possible without Kaft being involved. Use something supported (i. e. Weasyprint) and you're fine. Use something else and it's your problem.

(Reason: I have a hard to diagnose Weasyprint problem that is not showing up with paged.js...)

dragotin commented 2 years ago

If you want to swap out the engine, just write a script called weasyprint that Kraft invokes for you. That does not seem to be more sophisticated than having that in the settings.

I doubt that many Kraft users will benefit from this. Thus ... closing for the benefit of other, more usefull improvements.