[Poll] You wanted PDF, you got PDF

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:

https://erpnext.com/polls/development-poll-2

thanks,
Rushabh



@rushabh_mehta



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0536788B-A9FC-4F10-8D66-EB207B9E5CAA%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
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


On Tuesday, July 8, 2014 9:07:22 AM UTC+3, Rushabh Mehta wrote:
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



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/ddfcd6f2-e565-4478-a15b-1d84667fe148%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
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


On Tuesday, 8 July 2014 09:07:22 UTC+3, rushabh wrote:
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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/06520a7d-73ca-4cb5-80cc-6f8fdfbc1ea4%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

On Tue, Sep 2, 2014 at 11:05 PM, Christoph H. Larsen
ch...@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).

frappe/frappe/utils/pdf.py at develop · frappe/frappe · GitHub has
pdf specific code.

Didn’t know that weasyprint is from the radicale guys :slight_smile:

Thanks,

Pratik
erpnext

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写道:
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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/5a48d1a8-ed1c-419c-aad0-ed48d8107219%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
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...



On 03-Sep-2014, at 12:26 am, Pratik Vyas <pd...@gmail.com> wrote:

On Tue, Sep 2, 2014 at 11:05 PM, Christoph H. Larsen
<ch...@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

-- 
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-forum+un...@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.



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/355AF60C-7F3E-4ED0-B7AB-93DB4A0F9D88%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.

On Wed, Sep 3, 2014 at 6:23 AM, Y Y ya...@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

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写道:
On Wed, Sep 3, 2014 at 6:23 AM, Y Y <ya...@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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/91d9155d-3230-4b4f-a4b2-2b5e773e484f%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.