I have an image (TIFF file) via a url that I need to convert to a pdf and then display that pdf on the screen.  Can someone give me a detailed way of doing this?  I've found bits and pieces on some ways to do this but not a full explanation.  Any help would be appreciated.


Also, this is for a web application only.

Hi Sam,


You have several options of doing this.  The HTML2PDF component will do images, I am not sure if it will do a TIFF. If not, You could probably use something like Cloudinary https://www.outsystems.com/forge/component-overview/457/cloudinary  to send the file and do the conversion.


I am not sure that you are going to get a step by step approach as there are many variables and different ways to do this depending on your exact situation

Stacey Levine wrote:

Hi Sam,


You have several options of doing this.  The HTML2PDF component will do images, I am not sure if it will do a TIFF. If not, You could probably use something like Cloudinary https://www.outsystems.com/forge/component-overview/457/cloudinary  to send the file and do the conversion.


I am not sure that you are going to get a step by step approach as there are many variables and different ways to do this depending on your exact situation


Thanks.  I've tried to use the HTML2PDF converter before creating this post but I keep getting a "The PDF generator is not configured. Please go into HtmlPdfConverter backoffice and upload the executable" error.  I went to the discussions for this component and found a link to a FAQs page on how to install binaries which is required for this component but I'm still pretty clueless as to how to do that.  Sorry, still pretty new to OutSystems.  I will give the Coudinary component a try though.

Sam Dyse wrote:

Stacey Levine wrote:

Hi Sam,


You have several options of doing this.  The HTML2PDF component will do images, I am not sure if it will do a TIFF. If not, You could probably use something like Cloudinary https://www.outsystems.com/forge/component-overview/457/cloudinary  to send the file and do the conversion.


I am not sure that you are going to get a step by step approach as there are many variables and different ways to do this depending on your exact situation


Thanks.  I've tried to use the HTML2PDF converter before creating this post but I keep getting a "The PDF generator is not configured. Please go into HtmlPdfConverter backoffice and upload the executable" error.  I went to the discussions for this component and found a link to a FAQs page on how to install binaries which is required for this component but I'm still pretty clueless as to how to do that.  Sorry, still pretty new to OutSystems.  I will give the Coudinary component a try though.


Cloudinary isn't going to work for me.  I believe the HTML2PDF error I mentioned below is main issue because I get that same error message even when I try using PDF.

Solution

Hi Sam,

The HtmlToPdfConverter uses wkhtmltopdf to convert a web page into a PDF. You will need to:

  • Download the latest stable version of wkhtmltopdf (as of this writing, that is 0.12.5-1) for the correct operating system (if it is on a Personal Environment, that would be the MSVC 2015 64-bit)
  • Use a Zip extractor (WinZip or 7-Zip should do the trick) to open the installer and extract from its bin folder the executables to generate PDFs (wkhtmltopdf.exe) and images (wkhtmltoimage.exe).
  • Go to http://your-environment.outsystemscloud.com/HtmlToPdfConverter/Administration.aspx (the Administration page of the HtmlToPdfConverter component)
  • Upload the wkhtmltopdf.exe file as the PDF Generator (and, optionally, upload the wkhtmltoimage.exe file as the Image Generator)

This should get you a working version of the HtmlToPDF converter component. You can test it by going to the pdf tab (at http://your-environment.outsystemscloud.com/HtmlToPdfConverter/HowToPDF.aspx) and try it out by pressing the Google or OutSystems Community buttons (or by providing a URL for it to turn into a PDF.

Hope this helped

Solution

Jorge Martins wrote:

Hi Sam,

The HtmlToPdfConverter uses wkhtmltopdf to convert a web page into a PDF. You will need to:

  • Download the latest stable version of wkhtmltopdf (as of this writing, that is 0.12.5-1) for the correct operating system (if it is on a Personal Environment, that would be the MSVC 2015 64-bit)
  • Use a Zip extractor (WinZip or 7-Zip should do the trick) to open the installer and extract from its bin folder the executables to generate PDFs (wkhtmltopdf.exe) and images (wkhtmltoimage.exe).
  • Go to http://your-environment.outsystemscloud.com/HtmlToPdfConverter/Administration.aspx (the Administration page of the HtmlToPdfConverter component)
  • Upload the wkhtmltopdf.exe file as the PDF Generator (and, optionally, upload the wkhtmltoimage.exe file as the Image Generator)

This should get you a working version of the HtmlToPDF converter component. You can test it by going to the pdf tab (at http://your-environment.outsystemscloud.com/HtmlToPdfConverter/HowToPDF.aspx) and try it out by pressing the Google or OutSystems Community buttons (or by providing a URL for it to turn into a PDF.

Hope this helped


Thanks for the detailed reply Jorge.  I've followed your steps, but now I'm receiving a new error message:


And here's my Administration setup if that helps:



Also, here's everything that was in my bin folder:

I also tried running my browser as administration to see if that made a difference but it didn't.

Is this a Personal Environment? If so, and according to the screenshot, you need to tick the "Write Binaries to Running Dir" checkbox. I can't really test this right now as the version I have installed on my PE is outdated.

This isn't a personal environment. It's an enterprise cloud environment.  I went ahead and checked that checkbox but I still received that error message.  Thanks for help though.

Are there any errors in the Errors log (in Service Center)? Can you understand what is happening to cause the error?

If not, I suggest you either share the link to this post on the Support page for the component or post there a new topic with the error you are getting, your Administration page screenshot and the details on what kind of environment you have? The team that maintains the component will be notified and try to help you.

Just the same error I posted before but I'll add the post over there and go ahead and marked this as a solution.  Thanks again for the help around this.