[Html2PdfConverter] Unwanted Spaces in PDF Generated

[Html2PdfConverter] Unwanted Spaces in PDF Generated

  
Forge Component
(42)
Published on 23 Jun by Guilherme Pereira
42 votes
Published on 23 Jun by Guilherme Pereira

Hi There,


When I use this plugin(Java Environment), it adds some spaces that were not there in the original Document especially in case of links. If add a link like www.google.com, when rendered to PDF and clicked on the link from the file, it takes to "www.google" not "www.google.com". What can I do to improve the quality and remove these spaces?


Thanks,

Gurvinder

Anyone has any solution?

I would like to help you, but I even couldn't make the component work on a java environment.
How did you configure the component? I tried verything from the docs, but none where working.

Could you make a screenshot of your configuration?

I will help you once I get it working!

Hi Niels,

Justin James configured this plugin on our platform and here's the configuration he used:

Make sure you're installing whole solution as it is and not just the xif and make sure you have it's FileSystem dependency installed. Once installed, in your application, add reference to GeneratePDF action from HtmlToPdfConvertor eSpace. To that, provide in the URL of the page you want to generate PDF of. To generate the URL of the page which is inside the application, we do something like:

"http://127.0.0.1" + GetEntryURL(PDFName, eSpaceName: "ESPACE", FirstParameterName: "GUID", FirstParameterValue: GUID)

Our page receives a parameter named GUID, which is being passsed above. If your page doesn't have any input parameter, you can skip that part then.

Hi,

Thank you but i meant the administration page of the component, where you have to upload all the required binaries.

Could you provide me that configuration? Which binaries, the folder esc..

Thanks for the help,

Niels

Hi Niels,

I'm not sure about that. As I said earlier, Justin configured it on our environment. Try sending him a message if he can provide you with details on it http://www.outsystems.com/profile/5685/justin-james/

Hi Niels,


Did it work for you? I installed it on my personal environment and it worked fine by adding wkhtmltopdf.exe and wkhtmltoimage.exe

Hi Guys,


We already tried everything on FAQ. We have a JAVA stack on a linux server. And the enterprise environment is a "newer" version compared to other JAVA stack/Linux servers.

one of the main issue is read/write rights on folders. The component/FAQ suggest we need to place the libs in a directory /Jboss ... esc..
Our environment has a 'different' architecture compared to the others, which means those things are different.

That's the main problem we are facing. Unfortunatly Outsystems support doesn't cover this component and we are facing an issue we can't resolve.

Hi, our server also not using JBoss...

We're using Wildfly, and I have been able to upload the binaries successfully.

1. Make sure to install Filesystem component first, then open it in Integration Studio to upgrade and compile/1-click publish.

2. Install HTML2PDFConverter component, then open the extension part in Integration Studio to upgrade and compile/1-click publish.

3. Open espace part of HTML2PDFConverter component in Service Studio, and publish it.

4. Grant HTML2PDFAdmin role to one of your user

5. Run HTML2PDFConverter espace in Chrome, read the instruction, and download and extract required binaries.

6. Click on Administration link and login using user with HTML2PDFAdmin role.

7. First change Home Folder to home path (not installation path) of your J2EE (my server: /home/wildfly). I guess any folder with proper read/write permission can also be used here (but I haven't test).

8. Click Apply

9. Click Choose File for PDF Generator, point it to extracted binaries with name: wkhtmltopdf, then click Upload

10. Click Choose File for Image Generator, point it to extracted binaries with name: wkhtmltoimage, then click Upload 


It should be uploaded successfully if you entered the right Home Folder.


Hope it helps,

Harlin.


Harlin Setiadarma wrote:

Hi, our server also not using JBoss...

We're using Wildfly, and I have been able to upload the binaries successfully.

1. Make sure to install Filesystem component first, then open it in Integration Studio to upgrade and compile/1-click publish.

2. Install HTML2PDFConverter component, then open the extension part in Integration Studio to upgrade and compile/1-click publish.

3. Open espace part of HTML2PDFConverter component in Service Studio, and publish it.

4. Grant HTML2PDFAdmin role to one of your user

5. Run HTML2PDFConverter espace in Chrome, read the instruction, and download and extract required binaries.

6. Click on Administration link and login using user with HTML2PDFAdmin role.

7. First change Home Folder to home path (not installation path) of your J2EE (my server: /home/wildfly). I guess any folder with proper read/write permission can also be used here (but I haven't test).

8. Click Apply

9. Click Choose File for PDF Generator, point it to extracted binaries with name: wkhtmltopdf, then click Upload

10. Click Choose File for Image Generator, point it to extracted binaries with name: wkhtmltoimage, then click Upload 


It should be uploaded successfully if you entered the right Home Folder.


Hope it helps,

Harlin.



Hi Harlin,


Thank you!

Which binaries did you upload? Since we have a linux server we can't use the .exe and dll files.
We already tried every other binaries (for java/linux) but none of them where working.

If you can tell me which binaries you used, I can try out your suggestion!

Many thanks

Hi, I use this (Stable Version/Linux), specifically 64-bit one... 

Thank you very much! Finally it worked.


@Gurvinder I'll try to reproduce your case and help you