Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Local Pdf Generation Add-On. Rate Topic   - - - - -

 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 446 posts

Posted 08 November 2018 - 04:07 PM #1

Hello,

 

We have created an addon for generating PDF files locally. If you are interested you can install the add-on by following the instructions on the github page: https://github.com/p...eb/pp_local_pdf.

 

Kind regards,


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18358 posts

Posted 09 November 2018 - 04:57 AM #2

Thanks. Does it support headers and footers?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 446 posts

Posted 09 November 2018 - 06:15 AM #3

Thanks. Does it support headers and footers?

 

Everything in the current e-mail templates is supported since it is exactly the same to CS-Carts setup for converting HTML to PDF. 

 

Furthermore, WkHtmlToPdf has a seperate option for adding headers and footers if that is what you desire. To achieve this you will have to push the following options:

$options = array(
    'footer-html' => '....',
    'header-html' => '....'
)

Let me know if you have any more questions.


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2210 posts

Posted 09 November 2018 - 07:26 AM #4

Wow, thanks! Will install this soon. (PS on your homepage: laser is with an S :) )


When life hands you lemons, bring on the Tequila baby!


 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 446 posts

Posted 09 November 2018 - 08:24 AM #5

Wow, thanks! Will install this soon. (PS on your homepage: laser is with an S :) )

 

Well, it's and inside joke from one of our devs. But for your satisfaction I'll change it ;)


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18358 posts

Posted 09 November 2018 - 08:37 AM #6

Everything in the current e-mail templates is supported since it is exactly the same to CS-Carts setup for converting HTML to PDF. 

 

Furthermore, WkHtmlToPdf has a seperate option for adding headers and footers if that is what you desire. To achieve this you will have to push the following options:

$options = array(
    'footer-html' => '....',
    'header-html' => '....'
)

Let me know if you have any more questions.

 

CS-Cart's pdf converter also supports headers and footers, but the file is not generated if you put this data. Error is received and looks like they do not consider it as a bug


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2210 posts

Posted 09 November 2018 - 08:40 AM #7

Well, it's and inside joke from one of our devs. But for your satisfaction I'll change it ;)

 

oh haha well don't change it for me :D


When life hands you lemons, bring on the Tequila baby!


 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 446 posts

Posted 09 November 2018 - 08:46 AM #8

CS-Cart's pdf converter also supports headers and footers, but the file is not generated if you put this data. Error is received and looks like they do not consider it as a bug

 

Seeing that it's just default functionality of WkHtmlToPdf, this shouldn't be a problem at all.


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 348 posts

Posted 09 November 2018 - 08:50 AM #9

i install this but converted pdf. is 0 byte what can be problem ?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18358 posts

Posted 09 November 2018 - 01:16 PM #10

Seeing that it's just default functionality of WkHtmlToPdf, this shouldn't be a problem at all.

 

Unfortunately, online generator from CS-Cart does not support all parameters of WkHtmlToPdf


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 446 posts

Posted 09 November 2018 - 01:41 PM #11

i install this but converted pdf. is 0 byte what can be problem ?

 

The problem most likely is that you didnt follow the installation instructions properly. When you install WkHtmlToPdf directly from the apt repository it requires a display to be attached, therefore you will have to compile the library yourself with the following commands, that is assuming you are on Ubuntu 18.04 LTS:

sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo apt-get install -f
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 348 posts

Posted 09 November 2018 - 01:55 PM #12

i am 16.4 i install follow your guide. same also i install vie apt gen install wkhtmltopdf

same result



 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 446 posts

Posted 09 November 2018 - 02:00 PM #13

i am 16.4 i install follow your guide. same also i install vie apt gen install wkhtmltopdf

same result

 

Can you access the CLI and type 'wkhtmltopdf http://google.comgoogle.pdf' and share the error notice with us?


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 348 posts

Posted 09 November 2018 - 02:08 PM #14

QXcbConnection: Could not connect to display
Aborted
 



 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 348 posts

Posted 09 November 2018 - 02:13 PM #15

i am install 0.12.4 lets test with that



 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 446 posts

Posted 09 November 2018 - 02:16 PM #16

i am install 0.12.4 lets test with that

 

This is a result of not building the library from source, you can not instal it with a package manager because the applications there are not compiled headless. I modified the script to work with your ubuntu version:

sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~xenial_amd64.deb
sudo dpkg -i wkhtmltox_0.12.1.3-1~xenial_amd64.deb
sudo apt-get install -f
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 348 posts

Posted 09 November 2018 - 02:17 PM #17

worked now non english characters getting problem. any idea to fix ?


0.12.4 worked mate



 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 348 posts

Posted 09 November 2018 - 02:25 PM #18

added

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

to

design/backend/mail/templates/common/wrap_document.tpl

fixed



 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 446 posts

Posted 09 November 2018 - 02:30 PM #19

worked now non english characters getting problem. any idea to fix ?


0.12.4 worked mate

 

Yes, you can try adding the appropiate encoding to the file if you want. There are 2 ways to do so:

 

1. Add encoding to the html document.

<meta charset='%YOUR ENCODING%'>

2. Add encoding as an option in the array

 $default_params = array(
    'no-outline',
    'margin-top'    => 0,
    'margin-right'  => 0,
    'margin-bottom' => 0,
    'margin-left'   => 0,
    'page-size'     => 'A4',
    'encoding'      => '%YOUR ENCODING%'
);

PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 348 posts

Posted 09 November 2018 - 02:30 PM #20

thanks for your feedbacks. great job ! thank you.