[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing system - alternative proposal forpdf output




 Hi Erik,

Thank you for your comments! Here are mine :)

  1. Regarding benefits, I did not forget the easy-to-edit-html-templates. It is really a big benefit.
  2. My opinion is, latex/xelatex not really a lightweight solution, comparing to statically compiled wkhtmltopdf, which is a single 11.5MB file.
  3. No doubt, tex can produce much more nice output, but frankly, I never saw tex experts and really eye-candy templates.
  4. You are right, an easy option could help to use alternatives, for example if the downloadable pdf output is the goal:
  5. Latex/Xelatex: seems latex much faster than xelatex. I just wondering, why was necessary to involve xelatex if an easy inputenc can solve utf8 issues? I did not try it with ledgersmb yet, I screwed my main server with xelatex and modify some invocations already to get pdf output, which also break the easy deployment.
  6. I also thought about cups-pdf as virtual printer.

I will try to dig deeper with stock latex + inputenc, which maybe easier to deploy than hacking xelatex. This is only a theory at this moment. I will report later.

Good night/morning!

Bye,

István

 

 

----------------eredeti üzenet-----------------
Feladó: "Erik Huelsmann" <..hidden..>
Címzett: "Development discussion for LedgerSMB" <..hidden..>
Dátum: Mon, 26 Aug 2013 23:51:34 +0200
----------------------------------------------------------


Hi Istvan,


I am a little bit frustrated to get full utf-8 pdf output support from lsmb

I guess you're not alone. It's definitely a tough topic.
 

I am able to use xedemo templates with xelatex, here are my experiences:

  • editing xelatex templates is a horror story, especially if someone not expert in *tex,
  • seems utf-8 support does not work out of the box (which is interesting, because the Hungarian sql-ledger fork is working without issue, only thing is needed in the template: \usepackage[utf8x]{inputenc}
If you need to use the inputenc package with your (la)tex, then you're using LaTeX, not XeLaTeX. You could try editing the LaTeX templates and use those instead of using xelatex.
 
  • somehow generating pdf with xelatex incredibely slow, comparing to the previous solution

I made a little research around the following topic: how to create pdf from html, with utf-8 support. After checking some theories (cups-pdf, html2ps), I found the following:

  • wkhtmltopdf (usually part of the distribution)
  • how to use example: wkhtmltopdf invoice-VSZ10001.html invoice.pdf

It is fast, supports utf-8, just works in one comfortable step.

You're forgetting a major advantage: with this solution, we need to maintain only a single set of templates and can scratch the LaTeX and XeLaTeX versions.

So, my proposal is to consider implementing an alternative pdf output, using wkhtmltopdf. The source is the html template but the output is pdf in one quick step. The result is really fine, except it is necessary to edit almost all of the layouts, because surprisingly I found that, html layouts needs serious changes to get good result.

There are a few disadvantages as well, though:
 
* wkhtmltopdf uses Webkit to generate the PDF; webkit is a pretty heavy solution - so we're not replacing a heavy solution with a lightweight solution; rather one heavy one with another
* If you *are* a (Xe)LaTeX wizzard, the output generated by (Xe)LaTeX looks a lot nicer than what has been shown to be possible in HTML
* As you pointed out yourself later, wkhtmltopdf might depend on people's X libraries being installed which is a pretty heavy solution for headless systems running webservers.
 
 
The above being noted, I have to say I went to do the same reseach you have just finished a few months back, because - as you - I run into the problem that I think designing LaTeX templates is both too complex for regular/non-tech/non-latex users. However, when discussing the subject with Chris, he was concerned to break existing setups as well as replacing one very heavy solution with another.
 
My conclusion would be that if we want to support both, we probably need a good way for the admin to select one option or the other, with autodetection logic to see if various options are available on the server.
 
 
--
Bye,
 
Erik.
 
http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk


_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel