Hi Erik,
Thank you for your comments! Here are mine :)
Regarding benefits, I did not forget the easy-to-edit-html-templates. It is
really a big benefit.
My opinion is, latex/xelatex not really a lightweight solution, comparing to
statically compiled wkhtmltopdf, which is a single 11.5MB file.
No doubt, tex can produce much more nice output, but frankly, I never saw tex
experts and really eye-candy templates.
You are right, an easy option could help to use alternatives, for example if
the downloadable pdf output is the goal:
One select input field to select the source template (tex vs. html)
One text input for give a command line, freeform, like this: [command %1 %2 ]
where %1 is the input, while %2 is the output (which could be pdf with
wkhtmltopdf or postscript, using html2ps)
examples:
html2ps %1 > %2
wkhtml2pdf-i386 %1 %2
fakeconverter -i %1 -o %2 -from html -to pdf -enc utf-8 -paper A4
the last example is not real but shows the possibility of a complex command
line syntax
just pass the source to this command and catch the output and send to the user
for safety reasons, maybe this option should be inserted to ledgersmb.conf
instead of the UI.
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.
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" [email protected]
Címzett: "Development discussion for LedgerSMB"
[email protected]
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 -> 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.clkt
>rk
>
>__________________________________________________
>
>
>_______________________________________________
>Ledger-smb-devel mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>
>
>
>
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel