[Poll] You wanted PDF, you got PDF

98 views
Skip to first unread message

Rushabh Mehta

unread,
Jul 8, 2014, 2:07:22 AM7/8/14
to erpnext-dev...@googlegroups.com, erpnext-user-forum@googlegroups.com Forum
Hello,

PDF is done! Yes it was embarassingly easy with wkhtmltopdf (a webkit + qt library that emulates browser behaviour to render the page, then converts it to HTML). We got stuck in font issues though on Linux + CentOS, but we will release it later today.

So the next poll is now ready:


thanks,
Rushabh



@rushabh_mehta

robert

unread,
Jul 8, 2014, 4:17:05 AM7/8/14
to erpnext-u...@googlegroups.com, erpnext-dev...@googlegroups.com
Besides a more beautiful default print format believe that an easier ways for the end-user to design (or adapt from default) the print formats would be highly appreciated. 
robert

Christoph H. Larsen

unread,
Sep 2, 2014, 1:35:38 PM9/2/14
to erpnext-dev...@googlegroups.com, erpnext-u...@googlegroups.com
Dear All,
As improved .pdf prinitnghas been on the wishlist, and is still a bit of an issue, I revisted the current strategy to use

wkhtmltopdf.

.. which is pretty humongous by any stretch of imagination. How about this one: http://www.weasyprint.org/?
WeasyPrint stems from the same FLOSS community that created Radicale, that tiny, fast and secure CardDAV/CalDAV server, and, yes, it uses Python.
While I am not at all any expert, I have the feeling that it may be at least casting an eye over this converter...
Thoughts?
Bests from Kampala,
Chris

Pratik Vyas

unread,
Sep 2, 2014, 2:56:55 PM9/2/14
to erpnext-dev...@googlegroups.com
On Tue, Sep 2, 2014 at 11:05 PM, Christoph H. Larsen
<christoph...@gmail.com> wrote:
> Dear All,
> As improved .pdf prinitnghas been on the wishlist, and is still a bit of an
> issue, I revisted the current strategy to use
>
> wkhtmltopdf.
>
> .. which is pretty humongous by any stretch of imagination. How about this
> one: http://www.weasyprint.org/?
> WeasyPrint stems from the same FLOSS community that created Radicale, that
> tiny, fast and secure CardDAV/CalDAV server, and, yes, it uses Python.
> While I am not at all any expert, I have the feeling that it may be at least
> casting an eye over this converter...
> Thoughts?
> Bests from Kampala,
> Chris
>
>

Hi Chris,

If I remember correctly, we did try weasyprint among many other
solutions (at least Anand and I did try it months before the final
decision) but I don't remember the reason why we rejected it.

wkhtmltopdf is a huge 35M blob with QT, etc in it but comes really
close to what we see on the browser.

If you find weasyprint better, you can submit a patch (maybe we can
configure the converter configurable).

https://github.com/frappe/frappe/blob/develop/frappe/utils/pdf.py has
pdf specific code.

Didn't know that weasyprint is from the radicale guys :)

Thanks,
--
Pratik
erpnext

Y Y

unread,
Sep 2, 2014, 8:53:14 PM9/2/14
to erpnext-dev...@googlegroups.com, erpnext-u...@googlegroups.com
I've got to say, I have't exported pdf successfully, always error reported.
1. latest wkhtmltopdf is 0.12, however apt-get one is 0.9
2. manually install wkhtmltopdf 0.12 need to install many dependencies, however which is lack documentation?

I tried in debian and ubantu, if anyone has experience to share, would be grateful!

在 2014年7月8日星期二UTC+8下午2时07分22秒,rushabh写道:

Rushabh Mehta

unread,
Sep 3, 2014, 12:56:59 AM9/3/14
to erpnext-dev...@googlegroups.com
We tried weasy print, but it required a certain quality of HTML and a lot of our current templates failed, the webkit engine will be as close to full-proof as possible...



-- 
Note:

If you are posting an issue,

1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

End of Note
--- 
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAG8U0EnWy30BNCiT7KmGuRNdV1t_GfvhtOKGnwWzKC-wfb6LgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Pratik Vyas

unread,
Sep 3, 2014, 1:10:33 AM9/3/14
to erpnext-dev...@googlegroups.com
On Wed, Sep 3, 2014 at 6:23 AM, Y Y <yangy...@gmail.com> wrote:
> I've got to say, I have't exported pdf successfully, always error reported.
> 1. latest wkhtmltopdf is 0.12, however apt-get one is 0.9
> 2. manually install wkhtmltopdf 0.12 need to install many dependencies,
> however which is lack documentation?
>
> I tried in debian and ubantu, if anyone has experience to share, would be
> grateful!

Binaries from the downloads page on wkhtmltopdf have worked for us on
Debian and Ubuntu.
We install it multiple times in a day on our CI environment,
https://github.com/frappe/erpnext/blob/develop/.travis.yml

What were the dependencies that were missing?

Just use `wkhtmltopdf https://en.wikipedia.org a.pdf` to test your installation.

Also, the bench auto install script is missing wkhtmltopdf for
debian/ubuntu, will add it soon.

Thanks,
--
Pratik
erpnext

Y Y

unread,
Sep 3, 2014, 1:32:12 AM9/3/14
to erpnext-dev...@googlegroups.com
The dependencies like libxtender, fontconfig,libc++6 etc. Looking forward to your updated bench. Thanks.


在 2014年9月3日星期三UTC+8下午1时10分33秒,Pratik Vyas写道:
Reply all
Reply to author
Forward
0 new messages