PDF in invoice email

I installed wkhtmltopdf and copied the fonts from the repo (I’m using ubuntu) but I get Error generating PDF, attachment sent as HTML.  Is there something else I have to do?  thanks!



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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.

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

On Sat, Jul 26, 2014 at 12:18 AM, John Hooks ho...@gmail.com wrote:

I installed wkhtmltopdf and copied the fonts from the repo (I’m using
ubuntu) but I get Error generating PDF, attachment sent as HTML. Is there
something else I have to do? thanks!

Hi John,

wkhtmltopdf might not be in the path. If which wkhtmltopdf returns a
path in /usr/local/bin then, either you’ll have to add it in the PATH
in supervisor or symlink it in /usr/bin

eg,

ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf


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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pratik
erpnext

Pratik,
    which wkhtmltopdf reports /usr/bin/wkhtmltopdf.  I also cleared the cache to make sure that wasn't the issue.  Still gives me the same error.  Is there anything else to try?

On Friday, July 25, 2014 2:51:46 PM UTC-4, Pratik Vyas wrote:
On Sat, Jul 26, 2014 at 12:18 AM, John Hooks <ho...@gmail.com> wrote:
> I installed wkhtmltopdf and copied the fonts from the repo (I'm using
> ubuntu) but I get Error generating PDF, attachment sent as HTML.  Is there
> something else I have to do?  thanks!
>
Hi John,

wkhtmltopdf might not be in the path. If `which wkhtmltopdf` returns a
path in /usr/local/bin then, either you'll have to add it in the PATH
in supervisor or symlink it in /usr/bin

eg,

ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf


> --
> 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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
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/cb7a2380-a0a2-444a-a000-f75522ad9981%40googlegroups.com.

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

On Sat, Jul 26, 2014 at 12:28 AM, John Hooks ho...@gmail.com wrote:

Pratik,
which wkhtmltopdf reports /usr/bin/wkhtmltopdf. I also cleared the
cache to make sure that wasn’t the issue. Still gives me the same error.
Is there anything else to try?

You could try restarting gunicorn

You can also run wkhtmltopdf https://en.wikipedia.org /dev/null to
see if it’s producing any errors (maybe missing some dependencies like
libxext or libxrender).

On Friday, July 25, 2014 2:51:46 PM UTC-4, Pratik Vyas wrote:

On Sat, Jul 26, 2014 at 12:18 AM, John Hooks ho...@gmail.com wrote:

I installed wkhtmltopdf and copied the fonts from the repo (I’m using
ubuntu) but I get Error generating PDF, attachment sent as HTML. Is
there
something else I have to do? thanks!

Hi John,

wkhtmltopdf might not be in the path. If which wkhtmltopdf returns a
path in /usr/local/bin then, either you’ll have to add it in the PATH
in supervisor or symlink it in /usr/bin

eg,

ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf


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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/cb7a2380-a0a2-444a-a000-f75522ad9981%40googlegroups.com.

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


Pratik
erpnext

Ah thanks so much.  I got a cannot connect to x server error.  I installed from apt-get and that must have been the issue.  I downloaded it from wkhtmltopdf.org and manually installed it and all is good.  Thanks so much!!  This is great.  For some reason when I sent people the html invoices they didn't know what to do with them.  This will make everything easier.  Thanks again!

On Friday, July 25, 2014 3:15:09 PM UTC-4, Pratik Vyas wrote:
On Sat, Jul 26, 2014 at 12:28 AM, John Hooks <ho...@gmail.com> wrote:
> Pratik,
>     which wkhtmltopdf reports /usr/bin/wkhtmltopdf.  I also cleared the
> cache to make sure that wasn't the issue.  Still gives me the same error.
> Is there anything else to try?

You could try restarting gunicorn

You can also run `wkhtmltopdf https://en.wikipedia.org /dev/null` to
see if it's producing any errors (maybe missing some dependencies like
libxext or libxrender).

>
> On Friday, July 25, 2014 2:51:46 PM UTC-4, Pratik Vyas wrote:
>>
>> On Sat, Jul 26, 2014 at 12:18 AM, John Hooks <ho...@gmail.com> wrote:
>> > I installed wkhtmltopdf and copied the fonts from the repo (I'm using
>> > ubuntu) but I get Error generating PDF, attachment sent as HTML.  Is
>> > there
>> > something else I have to do?  thanks!
>> >
>> Hi John,
>>
>> wkhtmltopdf might not be in the path. If `which wkhtmltopdf` returns a
>> path in /usr/local/bin then, either you'll have to add it in the PATH
>> in supervisor or symlink it in /usr/bin
>>
>> eg,
>>
>> ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
>>
>>
>> > --
>> > 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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> 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/cb7a2380-a0a2-444a-a000-f75522ad9981%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
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/7d768e5f-cefc-4988-ba23-951e53bde248%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Pratik,
  I did an update and noticed that the pdf now isn't pulling in the html formatting correctly.  The preview on the print screen looks correct but the pdf comes out with everything aligned on the left and the table has no borders.  

On Friday, July 25, 2014 3:15:09 PM UTC-4, Pratik Vyas wrote:
On Sat, Jul 26, 2014 at 12:28 AM, John Hooks <ho...@gmail.com> wrote:
> Pratik,
>     which wkhtmltopdf reports /usr/bin/wkhtmltopdf.  I also cleared the
> cache to make sure that wasn't the issue.  Still gives me the same error.
> Is there anything else to try?

You could try restarting gunicorn

You can also run `wkhtmltopdf https://en.wikipedia.org /dev/null` to
see if it's producing any errors (maybe missing some dependencies like
libxext or libxrender).

>
> On Friday, July 25, 2014 2:51:46 PM UTC-4, Pratik Vyas wrote:
>>
>> On Sat, Jul 26, 2014 at 12:18 AM, John Hooks <ho...@gmail.com> wrote:
>> > I installed wkhtmltopdf and copied the fonts from the repo (I'm using
>> > ubuntu) but I get Error generating PDF, attachment sent as HTML.  Is
>> > there
>> > something else I have to do?  thanks!
>> >
>> Hi John,
>>
>> wkhtmltopdf might not be in the path. If `which wkhtmltopdf` returns a
>> path in /usr/local/bin then, either you'll have to add it in the PATH
>> in supervisor or symlink it in /usr/bin
>>
>> eg,
>>
>> ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
>>
>>
>> > --
>> > 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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> 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/cb7a2380-a0a2-444a-a000-f75522ad9981%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
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/de3c13e7-bc56-4a52-8329-0097ab861269%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
By the way, the new print preview looks awesome!

On Saturday, July 26, 2014 7:31:00 PM UTC-4, John Hooks wrote:
Pratik,
  I did an update and noticed that the pdf now isn't pulling in the html formatting correctly.  The preview on the print screen looks correct but the pdf comes out with everything aligned on the left and the table has no borders.  

On Friday, July 25, 2014 3:15:09 PM UTC-4, Pratik Vyas wrote:
On Sat, Jul 26, 2014 at 12:28 AM, John Hooks <ho...@gmail.com> wrote:
> Pratik,
>     which wkhtmltopdf reports /usr/bin/wkhtmltopdf.  I also cleared the
> cache to make sure that wasn't the issue.  Still gives me the same error.
> Is there anything else to try?

You could try restarting gunicorn

You can also run `wkhtmltopdf https://en.wikipedia.org /dev/null` to
see if it's producing any errors (maybe missing some dependencies like
libxext or libxrender).

>
> On Friday, July 25, 2014 2:51:46 PM UTC-4, Pratik Vyas wrote:
>>
>> On Sat, Jul 26, 2014 at 12:18 AM, John Hooks <ho...@gmail.com> wrote:
>> > I installed wkhtmltopdf and copied the fonts from the repo (I'm using
>> > ubuntu) but I get Error generating PDF, attachment sent as HTML.  Is
>> > there
>> > something else I have to do?  thanks!
>> >
>> Hi John,
>>
>> wkhtmltopdf might not be in the path. If `which wkhtmltopdf` returns a
>> path in /usr/local/bin then, either you'll have to add it in the PATH
>> in supervisor or symlink it in /usr/bin
>>
>> eg,
>>
>> ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
>>
>>
>> > --
>> > 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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> 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/cb7a2380-a0a2-444a-a000-f75522ad9981%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
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/6cf2027d-f6d8-423d-a98e-a073ae26efdd%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
John. Are you using bench/honcho start or production setup?

It not prod setup,
set "host_name": "http://yoursite:8000" I'm site_config.json and try. 

Sent from my phone

On 27-Jul-2014, at 5:06, John Hooks <ho...@gmail.com> wrote:

By the way, the new print preview looks awesome!

On Saturday, July 26, 2014 7:31:00 PM UTC-4, John Hooks wrote:
Pratik,
  I did an update and noticed that the pdf now isn't pulling in the html formatting correctly.  The preview on the print screen looks correct but the pdf comes out with everything aligned on the left and the table has no borders.  

On Friday, July 25, 2014 3:15:09 PM UTC-4, Pratik Vyas wrote:
On Sat, Jul 26, 2014 at 12:28 AM, John Hooks <ho...@gmail.com> wrote:
> Pratik,
>     which wkhtmltopdf reports /usr/bin/wkhtmltopdf.  I also cleared the
> cache to make sure that wasn't the issue.  Still gives me the same error.
> Is there anything else to try?

You could try restarting gunicorn

You can also run `wkhtmltopdf https://en.wikipedia.org /dev/null` to
see if it's producing any errors (maybe missing some dependencies like
libxext or libxrender).

>
> On Friday, July 25, 2014 2:51:46 PM UTC-4, Pratik Vyas wrote:
>>
>> On Sat, Jul 26, 2014 at 12:18 AM, John Hooks <ho...@gmail.com> wrote:
>> > I installed wkhtmltopdf and copied the fonts from the repo (I'm using
>> > ubuntu) but I get Error generating PDF, attachment sent as HTML.  Is
>> > there
>> > something else I have to do?  thanks!
>> >
>> Hi John,
>>
>> wkhtmltopdf might not be in the path. If `which wkhtmltopdf` returns a
>> path in /usr/local/bin then, either you'll have to add it in the PATH
>> in supervisor or symlink it in /usr/bin
>>
>> eg,
>>
>> ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
>>
>>
>> > --
>> > 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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> 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/cb7a2380-a0a2-444a-a000-f75522ad9981%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
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/6cf2027d-f6d8-423d-a98e-a073ae26efdd%40googlegroups.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/A3F422A4-4DA0-4B97-8AC8-15447C2BFF52%40iwebnotes.com.

    For more options, visit https://groups.google.com/d/optout.
I'm using production. I was going to to stop nginx and supervisor but I didn't see where site_config.json is?


On Sat, Jul 26, 2014 at 11:48 PM, Anand Doshi <an...@iwebnotes.com> wrote:
John. Are you using bench/honcho start or production setup?

It not prod setup,
set "host_name": "http://yoursite:8000" I'm site_config.json and try.

Sent from my phone

On 27-Jul-2014, at 5:06, John Hooks <ho...@gmail.com> wrote:

By the way, the new print preview looks awesome!

On Saturday, July 26, 2014 7:31:00 PM UTC-4, John Hooks wrote:
Pratik,
I did an update and noticed that the pdf now isn't pulling in the html formatting correctly. The preview on the print screen looks correct but the pdf comes out with everything aligned on the left and the table has no borders.

On Friday, July 25, 2014 3:15:09 PM UTC-4, Pratik Vyas wrote:
On Sat, Jul 26, 2014 at 12:28 AM, John Hooks <ho...@gmail.com> wrote:
> Pratik,
> which wkhtmltopdf reports /usr/bin/wkhtmltopdf. I also cleared the
> cache to make sure that wasn't the issue. Still gives me the same error.
> Is there anything else to try?

You could try restarting gunicorn

You can also run `wkhtmltopdf https://en.wikipedia.org /dev/null` to
see if it's producing any errors (maybe missing some dependencies like
libxext or libxrender).

>
> On Friday, July 25, 2014 2:51:46 PM UTC-4, Pratik Vyas wrote:
>>
>> On Sat, Jul 26, 2014 at 12:18 AM, John Hooks <ho...@gmail.com> wrote:
>> > I installed wkhtmltopdf and copied the fonts from the repo (I'm using
>> > ubuntu) but I get Error generating PDF, attachment sent as HTML. Is
>> > there
>> > something else I have to do? thanks!
>> >
>> Hi John,
>>
>> wkhtmltopdf might not be in the path. If `which wkhtmltopdf` returns a
>> path in /usr/local/bin then, either you'll have to add it in the PATH
>> in supervisor or symlink it in /usr/bin
>>
>> eg,
>>
>> ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
>>
>>
>> > --
>> > 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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> 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/cb7a2380-a0a2-444a-a000-f75522ad9981%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
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.



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 a topic in the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this topic, visit https://groups.google.com/d/topic/erpnext-developer-forum/AOz790DYP_4/unsubscribe.

To unsubscribe from this group and all its topics, 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/A3F422A4-4DA0-4B97-8AC8-15447C2BFF52%40iwebnotes.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/CAK6hC1WB0rksPgLzSXSBf%2ByiiShp5agwWqvBRbFZBoYWbTeOAg%40mail.gmail.com.

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


On 28 Jul 2014 01:57, "John Hooks" <ho...@gmail.com> wrote:
>
> I'm using production. I was going to to stop nginx and supervisor but I didn't see where site_config.json is?

It's at frappe-bench/sites/SITENAME/site_config.json

You don't have restart gunicorn to change the site config.

>
>
> On Sat, Jul 26, 2014 at 11:48 PM, Anand Doshi <an...@iwebnotes.com> wrote:
>>
>> John. Are you using bench/honcho start or production setup?
>>
>> It not prod setup,
>> set "host_name": "http://yoursite:8000" I'm site_config.json and try.
>>
>> Sent from my phone
>>
>> On 27-Jul-2014, at 5:06, John Hooks <ho...@gmail.com> wrote:
>>
>>> By the way, the new print preview looks awesome!
>>>
>>> On Saturday, July 26, 2014 7:31:00 PM UTC-4, John Hooks wrote:
>>>>
>>>> Pratik,
>>>> I did an update and noticed that the pdf now isn't pulling in the html formatting correctly. The preview on the print screen looks correct but the pdf comes out with everything aligned on the left and the table has no borders.

>>>>

>>>> On Friday, July 25, 2014 3:15:09 PM UTC-4, Pratik Vyas wrote:

>>>>>

>>>>> On Sat, Jul 26, 2014 at 12:28 AM, John Hooks <ho…@gmail.com> wrote:

>>>>> > Pratik,

>>>>> > which wkhtmltopdf reports /usr/bin/wkhtmltopdf. I also cleared the

>>>>> > cache to make sure that wasn't the issue. Still gives me the same error.

>>>>> > Is there anything else to try?

>>>>>

>>>>> You could try restarting gunicorn

>>>>>

>>>>> You can also run wkhtmltopdf <a href="https://en.wikipedia.org">https://en.wikipedia.org</a> /dev/null to

>>>>> see if it's producing any errors (maybe missing some dependencies like

>>>>> libxext or libxrender).

>>>>>

>>>>> >

>>>>> > On Friday, July 25, 2014 2:51:46 PM UTC-4, Pratik Vyas wrote:

>>>>> >>

>>>>> >> On Sat, Jul 26, 2014 at 12:18 AM, John Hooks <ho…@gmail.com> wrote:

>>>>> >> > I installed wkhtmltopdf and copied the fonts from the repo (I'm using

>>>>> >> > ubuntu) but I get Error generating PDF, attachment sent as HTML. Is

>>>>> >> > there

>>>>> >> > something else I have to do? thanks!

>>>>> >> >

>>>>> >> Hi John,

>>>>> >>

>>>>> >> wkhtmltopdf might not be in the path. If which wkhtmltopdf returns a

>>>>> >> path in /usr/local/bin then, either you'll have to add it in the PATH

>>>>> >> in supervisor or symlink it in /usr/bin

>>>>> >>

>>>>> >> eg,

>>>>> >>

>>>>> >> ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf

>>>>> >>

>>>>> >>

>>>>> >> > –

>>>>> >> > 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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.

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

>>>>> >>

>>>>> >>

>>>>> >>

>>>>> >> –

>>>>> >> 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/cb7a2380-a0a2-444a-a000-f75522ad9981%40googlegroups.com.

>>>>> >

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

>>>>>

>>>>>

>>>>>

>>>>> –

>>>>> 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/6cf2027d-f6d8-423d-a98e-a073ae26efdd%40googlegroups.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 a topic in the Google Groups "ERPNext Developer Forum" group.

>> To unsubscribe from this topic, visit https://groups.google.com/d/topic/erpnext-developer-forum/AOz790DYP_4/unsubscribe.

>> To unsubscribe from this group and all its topics, 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/A3F422A4-4DA0-4B97-8AC8-15447C2BFF52%40iwebnotes.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/CAK6hC1WB0rksPgLzSXSBf%2ByiiShp5agwWqvBRbFZBoYWbTeOAg%40mail.gmail.com.

>

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

Thanks Pratik,
Do I still add this if I'm in production mode?


On Sun, Jul 27, 2014 at 4:30 PM, Pratik Vyas <pd...@gmail.com> wrote:


On 28 Jul 2014 01:57, "John Hooks" <ho...@gmail.com> wrote:
>
> I'm using production. I was going to to stop nginx and supervisor but I didn't see where site_config.json is?

It's at frappe-bench/sites/SITENAME/site_config.json

You don't have restart gunicorn to change the site config.

>
>
> On Sat, Jul 26, 2014 at 11:48 PM, Anand Doshi <an...@iwebnotes.com> wrote:
>>
>> John. Are you using bench/honcho start or production setup?
>>
>> It not prod setup,
>> set "host_name": "http://yoursite:8000" I'm site_config.json and try.
>>
>> Sent from my phone
>>
>> On 27-Jul-2014, at 5:06, John Hooks <ho...@gmail.com> wrote:
>>
>>> By the way, the new print preview looks awesome!
>>>
>>> On Saturday, July 26, 2014 7:31:00 PM UTC-4, John Hooks wrote:
>>>>
>>>> Pratik,
>>>> I did an update and noticed that the pdf now isn't pulling in the html formatting correctly. The preview on the print screen looks correct but the pdf comes out with everything aligned on the left and the table has no borders.

>>>>

>>>> On Friday, July 25, 2014 3:15:09 PM UTC-4, Pratik Vyas wrote:

>>>>>

>>>>> On Sat, Jul 26, 2014 at 12:28 AM, John Hooks <ho…@gmail.com> wrote:

>>>>> > Pratik,

>>>>> > which wkhtmltopdf reports /usr/bin/wkhtmltopdf. I also cleared the

>>>>> > cache to make sure that wasn't the issue. Still gives me the same error.

>>>>> > Is there anything else to try?

>>>>>

>>>>> You could try restarting gunicorn

>>>>>

>>>>> You can also run wkhtmltopdf <a href="https://en.wikipedia.org" target="_blank">https://en.wikipedia.org</a> /dev/null to

>>>>> see if it's producing any errors (maybe missing some dependencies like

>>>>> libxext or libxrender).

>>>>>

>>>>> >

>>>>> > On Friday, July 25, 2014 2:51:46 PM UTC-4, Pratik Vyas wrote:

>>>>> >>

>>>>> >> On Sat, Jul 26, 2014 at 12:18 AM, John Hooks <ho…@gmail.com> wrote:

>>>>> >> > I installed wkhtmltopdf and copied the fonts from the repo (I'm using

>>>>> >> > ubuntu) but I get Error generating PDF, attachment sent as HTML. Is

>>>>> >> > there

>>>>> >> > something else I have to do? thanks!

>>>>> >> >

>>>>> >> Hi John,

>>>>> >>

>>>>> >> wkhtmltopdf might not be in the path. If which wkhtmltopdf returns a

>>>>> >> path in /usr/local/bin then, either you'll have to add it in the PATH

>>>>> >> in supervisor or symlink it in /usr/bin

>>>>> >>

>>>>> >> eg,

>>>>> >>

>>>>> >> ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf

>>>>> >>

>>>>> >>

>>>>> >> > –

>>>>> >> > 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/4361fa63-9ae9-45ca-8ddd-25b51ea7f1bb%40googlegroups.com.

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

>>>>> >>

>>>>> >>

>>>>> >>

>>>>> >> –

>>>>> >> 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/cb7a2380-a0a2-444a-a000-f75522ad9981%40googlegroups.com.

>>>>> >

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

>>>>>

>>>>>

>>>>>

>>>>> –

>>>>> 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/6cf2027d-f6d8-423d-a98e-a073ae26efdd%40googlegroups.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 a topic in the Google Groups "ERPNext Developer Forum" group.

>> To unsubscribe from this topic, visit https://groups.google.com/d/topic/erpnext-developer-forum/AOz790DYP_4/unsubscribe.

>> To unsubscribe from this group and all its topics, 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/A3F422A4-4DA0-4B97-8AC8-15447C2BFF52%40iwebnotes.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/CAK6hC1WB0rksPgLzSXSBf%2ByiiShp5agwWqvBRbFZBoYWbTeOAg%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 a topic in the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this topic, visit https://groups.google.com/d/topic/erpnext-developer-forum/AOz790DYP_4/unsubscribe.

To unsubscribe from this group and all its topics, 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/CAG8U0E%3D9rQphcbQtvZYQXEQggzfJESDxC-OuZ3oo7ZFiRmDpmw%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/CAK6hC1WaApc1vGnE9gbvRVL5Gy2upsQQCmCp3oTO5sp24oZDvw%40mail.gmail.com.

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

On Mon, Jul 28, 2014 at 2:11 AM, John Hooks ho...@gmail.com wrote:

Thanks Pratik,
Do I still add this if I’m in production mode?

Yes, you can set it to “http://hostname”. It should be able to resolve
the css files.


Pratik
erpnext

Pratik,
In site_config.json I added the line "host_name": and then the host in quotes after. If I do this I get errors in the site and then if I click the download pdf button it won't connect to the database. If I take that out of the site_config.json file I get this error:

Traceback (innermost last):
  File "/home/john/frappe-bench/apps/frappe/frappe/app.py", line 54, in application
    response = frappe.api.handle()
  File "/home/john/frappe-bench/apps/frappe/frappe/api.py", line 42, in handle
    return frappe.handler.handle()
  File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle
    execute_cmd(cmd)
  File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 84, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/john/frappe-bench/apps/frappe/frappe/__init__.py", line 524, in call
    return fn(*args, **newargs)
  File "/home/john/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 91, in download_pdf
    frappe.local.response.filecontent = get_pdf(html)
  File "/home/john/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 28, in get_pdf
    pdfkit.from_string(html, fname, options=options or {})
  File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string
    return r.to_pdf(output_path)
  File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py", line 109, in to_pdf
    raise IOError('wkhtmltopdf reported an error:\n' + stderr.decode('utf-8'))
 IOError: wkhtmltopdf reported an error:
Loading pages (1/6)
[>                                                           ] 0%
[======>                                                     ] 10%
[=========>                                                  ] 16%
Warning: Failed to load http://site1.local/assets/frappe/css/bootstrap.css (ignore)
[============================================================] 100%
Counting pages (2/6)                                               
[============================================================] Object 1 of 1
Resolving links (4/6)                                                       
[============================================================] Object 1 of 1
Loading headers and footers (5/6)                                           
Printing pages (6/6)
[>                                                           ] Preparing
[==============================>                             ] Page 1 of 2
[============================================================] Page 2 of 2
Done                                                                      
Exit with code 1 due to network error: HostNotFoundError






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/CAK6hC1UgEa2OLz3-r_p78a%2BRyuh%2BrLyT%3DV97sWMMAdfmZX9mzw%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Pratik,
I apologize the other errors I was getting on the site were because I forgot a comma in the site_config.json file. However after I put in the correct host I still get this error from the download pdf option:

Traceback (innermost last):
  File "/home/john/frappe-bench/apps/frappe/frappe/app.py", line 54, in application
    response = frappe.api.handle()
  File "/home/john/frappe-bench/apps/frappe/frappe/api.py", line 42, in handle
    return frappe.handler.handle()
  File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle
    execute_cmd(cmd)
  File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 84, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/john/frappe-bench/apps/frappe/frappe/__init__.py", line 524, in call
    return fn(*args, **newargs)
  File "/home/john/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 91, in download_pdf
    frappe.local.response.filecontent = get_pdf(html)
  File "/home/john/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 28, in get_pdf
    pdfkit.from_string(html, fname, options=options or {})
  File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string
    return r.to_pdf(output_path)
  File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py", line 109, in to_pdf
    raise IOError('wkhtmltopdf reported an error:\n' + stderr.decode('utf-8'))
 IOError: wkhtmltopdf reported an error:
Loading pages (1/6)
[>                                                           ] 0%
[======>                                                     ] 10%
[=========>                                                  ] 16%
[=========================>                                  ] 43%
[============================================================] 100%
Counting pages (2/6)                                               
[============================================================] Object 1 of 1
Resolving links (4/6)                                                       
[============================================================] Object 1 of 1
Loading headers and footers (5/6)                                           
Printing pages (6/6)
[>                                                           ] Preparing
[============================================================] Page 1 of 1
Done                                                                      
Exit with code 1 due to network error: HostNotFoundError


On Mon, Jul 28, 2014 at 5:04 PM, John Hooks <ho...@gmail.com> wrote:
Pratik,
In site_config.json I added the line "host_name": and then the host in quotes after. If I do this I get errors in the site and then if I click the download pdf button it won't connect to the database. If I take that out of the site_config.json file I get this error:

Traceback (innermost last):
  File "/home/john/frappe-bench/apps/frappe/frappe/app.py", line 54, in application
    response = frappe.api.handle()
  File "/home/john/frappe-bench/apps/frappe/frappe/api.py", line 42, in handle
    return frappe.handler.handle()
  File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle
    execute_cmd(cmd)
  File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 84, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/john/frappe-bench/apps/frappe/frappe/__init__.py", line 524, in call
    return fn(*args, **newargs)
  File "/home/john/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 91, in download_pdf
    frappe.local.response.filecontent = get_pdf(html)
  File "/home/john/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 28, in get_pdf
    pdfkit.from_string(html, fname, options=options or {})
  File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string
    return r.to_pdf(output_path)
  File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py", line 109, in to_pdf
    raise IOError('wkhtmltopdf reported an error:\n' + stderr.decode('utf-8'))
 IOError: wkhtmltopdf reported an error:
Loading pages (1/6)
[>                                                           ] 0%
[======>                                                     ] 10%
[=========>                                                  ] 16%
Warning: Failed to load http://site1.local/assets/frappe/css/bootstrap.css (ignore)
[============================================================] 100%
Counting pages (2/6)                                               
[============================================================] Object 1 of 1
Resolving links (4/6)                                                       
[============================================================] Object 1 of 1
Loading headers and footers (5/6)                                           
Printing pages (6/6)
[>                                                           ] Preparing
[==============================>                             ] Page 1 of 2
[============================================================] Page 2 of 2
Done                                                                      
Exit with code 1 due to network error: HostNotFoundError







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/CAK6hC1V0coZCm%3DeOc4iDGW2%2BEEjnSyNgti29ajtMACWe0zN6nA%40mail.gmail.com.

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

You need to put it as http://site1.local:8000, if it runs on port 8000.

Essentially, the port should also be part of host_name.


Hmm. Should the key be base_url instead of host_name? @pdvyas what do you say?


Thanks,
Anand Doshi.


On Tue, Jul 29, 2014 at 2:50 AM, John Hooks <ho…@gmail.com> wrote:

Pratik,
I apologize the other errors I was getting on the site were because I forgot a comma in the site_config.json file. However after I put in the correct host I still get this error from the download pdf option:

Traceback (innermost last): File "/home/john/frappe-bench/apps/frappe/frappe/app.py", line 54, in application response = frappe.api.handle() File "/home/john/frappe-bench/apps/frappe/frappe/api.py", line 42, in handle return frappe.handler.handle() File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle execute_cmd(cmd) File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 84, in execute_cmd ret = frappe.call(method, **frappe.form_dict) File "/home/john/frappe-bench/apps/frappe/frappe/__init__.py", line 524, in call return fn(*args, **newargs) File "/home/john/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 91, in download_pdf frappe.local.response.filecontent = get_pdf(html) File "/home/john/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 28, in get_pdf pdfkit.from_string(html, fname, options=options or {}) File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string return r.to_pdf(output_path) File "/home/john/frappe-bench/env/local/lib/python2.7/site-
packages/pdfkit/pdfkit.py", line 109, in to_pdf raise IOError('wkhtmltopdf reported an error:\n' + stderr.decode('utf-8')) IOError: wkhtmltopdf reported an error: Loading pages (1/6) [> ] 0% [======> ] 10% [=========> ] 16% [=========================> ] 43% [============================================================] 100% Counting pages (2/6) [============================================================] Object 1 of 1 Resolving links (4/6) [============================================================] Object 1 of 1 Loading headers and footers (5/6) Printing pages (6/6) [> ] Preparing [============================================================] Page 1 of 1 Done Exit with code 1 due to network error: HostNotFoundError


On Mon, Jul 28, 2014 at 5:04 PM, John Hooks <ho...@gmail.com> wrote:
Pratik,
In site_config.json I added the line "host_name": and then the host in quotes after. If I do this I get errors in the site and then if I click the download pdf button it won't connect to the database. If I take that out of the site_config.json file I get this error:

Traceback (innermost last):
File "/home/john/frappe-bench/apps/frappe/frappe/app.py", line 54, in application
response = frappe.api.handle()
File "/home/john/frappe-bench/apps/frappe/frappe/api.py", line 42, in handle
return frappe.handler.handle()
File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle
execute_cmd(cmd)
File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 84, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/john/frappe-bench/apps/frappe/frappe/init.py", line 524, in call
return fn(*args, **newargs)
File "/home/john/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 91, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File "/home/john/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 28, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string
return r.to_pdf(output_path)
File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py", line 109, in to_pdf
raise IOError('wkhtmltopdf reported an error:\n' + stderr.decode('utf-8'))
IOError: wkhtmltopdf reported an error:
Loading pages (1/6)
[> ] 0%
[======> ] 10%
[=========> ] 16%
Warning: Failed to load http://site1.local/assets/frappe/css/bootstrap.css (ignore)
[============================================================] 100%
Counting pages (2/6)
[============================================================] Object 1 of 1
Resolving links (4/6)
[============================================================] Object 1 of 1
Loading headers and footers (5/6)
Printing pages (6/6)
[> ] Preparing
[==============================> ] Page 1 of 2
[============================================================] Page 2 of 2
Done
Exit with code 1 due to network error: HostNotFoundError









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/CAK6hC1V0coZCm%3DeOc4iDGW2%2BEEjnSyNgti29ajtMACWe0zN6nA%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/CAAQzbF3hHiH3u4jDi10sw-ZhVuqKvzJAhqPWwGDryYmv9Shdzw%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Thank you so much guys for your help. I feel like such a moron. It was an issue with my DNS settings. I figured it out when I couldn't send an email as well. Thanks for your time. Hopefully you didn't spend too much trying to help me.


On Tue, Jul 29, 2014 at 11:07 AM, Anand Doshi <an...@erpnext.com> wrote:
Hi John,

You need to put it as http://site1.local:8000, if it runs on port 8000.

Essentially, the port should also be part of host_name.


Hmm. Should the key be base_url instead of host_name? @pdvyas what do you say?


Thanks,
Anand Doshi.



On Tue, Jul 29, 2014 at 2:50 AM, John Hooks <ho…@gmail.com> wrote:

Pratik,
I apologize the other errors I was getting on the site were because I forgot a comma in the site_config.json file. However after I put in the correct host I still get this error from the download pdf option:

Traceback (innermost last): File "/home/john/frappe-bench/apps/frappe/frappe/app.py", line 54, in application response = frappe.api.handle() File "/home/john/frappe-bench/apps/frappe/frappe/api.py", line 42, in handle return frappe.handler.handle() File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle execute_cmd(cmd) File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 84, in execute_cmd ret = frappe.call(method, **frappe.form_dict) File "/home/john/frappe-bench/apps/frappe/frappe/__init__.py", line 524, in call return fn(*args, **newargs) File "/home/john/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 91, in download_pdf frappe.local.response.filecontent = get_pdf(html) File "/home/john/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 28, in get_pdf pdfkit.from_string(html, fname, options=options or {}) File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string return r.to_pdf(output_path) File "/home/john/frappe-bench/env/local/lib/python2.7/site-
packages/pdfkit/pdfkit.py", line 109, in to_pdf raise IOError('wkhtmltopdf reported an error:\n' + stderr.decode('utf-8')) IOError: wkhtmltopdf reported an error: Loading pages (1/6) [> ] 0% [======> ] 10% [=========> ] 16% [=========================> ] 43% [============================================================] 100% Counting pages (2/6) [============================================================] Object 1 of 1 Resolving links (4/6) [============================================================] Object 1 of 1 Loading headers and footers (5/6) Printing pages (6/6) [> ] Preparing [============================================================] Page 1 of 1 Done Exit with code 1 due to network error: HostNotFoundError


On Mon, Jul 28, 2014 at 5:04 PM, John Hooks <ho...@gmail.com> wrote:
Pratik,
In site_config.json I added the line "host_name": and then the host in quotes after. If I do this I get errors in the site and then if I click the download pdf button it won't connect to the database. If I take that out of the site_config.json file I get this error:

Traceback (innermost last):
File "/home/john/frappe-bench/apps/frappe/frappe/app.py", line 54, in application
response = frappe.api.handle()
File "/home/john/frappe-bench/apps/frappe/frappe/api.py", line 42, in handle
return frappe.handler.handle()
File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle
execute_cmd(cmd)
File "/home/john/frappe-bench/apps/frappe/frappe/handler.py", line 84, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/john/frappe-bench/apps/frappe/frappe/init.py", line 524, in call
return fn(*args, **newargs)
File "/home/john/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 91, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File "/home/john/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 28, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string
return r.to_pdf(output_path)
File "/home/john/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py", line 109, in to_pdf
raise IOError('wkhtmltopdf reported an error:\n' + stderr.decode('utf-8'))
IOError: wkhtmltopdf reported an error:
Loading pages (1/6)
[> ] 0%
[======> ] 10%
[=========> ] 16%
Warning: Failed to load http://site1.local/assets/frappe/css/bootstrap.css (ignore)
[============================================================] 100%
Counting pages (2/6)
[============================================================] Object 1 of 1
Resolving links (4/6)
[============================================================] Object 1 of 1
Loading headers and footers (5/6)
Printing pages (6/6)
[> ] Preparing
[==============================> ] Page 1 of 2
[============================================================] Page 2 of 2
Done
Exit with code 1 due to network error: HostNotFoundError









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/CAK6hC1V0coZCm%3DeOc4iDGW2%2BEEjnSyNgti29ajtMACWe0zN6nA%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 a topic in the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this topic, visit https://groups.google.com/d/topic/erpnext-developer-forum/AOz790DYP_4/unsubscribe.

To unsubscribe from this group and all its topics, 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/CAAQzbF3hHiH3u4jDi10sw-ZhVuqKvzJAhqPWwGDryYmv9Shdzw%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/CAK6hC1X6o2cChJKWPFsTOQVJTpZgQbo-N_H62yjjeKyu0U0e-A%40mail.gmail.com.

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