[Html2PdfConverter] Could not find file 'C:\Windows\TEMP\TEMPIEMRMNOANH.pdf'.

[Html2PdfConverter] Could not find file 'C:\Windows\TEMP\TEMPIEMRMNOANH.pdf'.

Forge Component
Published on 24 Mar by Guilherme Pereira
38 votes
Published on 24 Mar by Guilherme Pereira
Hi All,

I don't know why, but all the files that I have downloaded so far are 0 bites. Into the Error logs i have:
Could not find file 'C:\Windows\TEMP\TEMPIEMRMNOANH.pdf'.

There is any one that could give me any suggestion?

Binaries should be fine:

Many thanks

Hi Simone,

The error you have in the logs seems to be that the component cannot find the executable (or one of the libraries).

It could be related with a bug already identified with the feedback on the backoffice (http://www.outsystems.com/forums/discussion/7393/html-to-pdf-converter-discussion/#Post49580).

Have you tried to upload the binaries again? Can you check on the server if the executable and dlls are in the component folder?

Hi Guilherme,

i have checked the following directory:

C:\Program Files\OutSystems\Platform Server\running\HtmlToPdfConverter\binaries

Both executables look into the right place, the folders "binaries" has been created after the upload by the program.

I don't know how to check the dlls, Could you please suggest me how to do it?

Many thanks


Hi Simone,

For the dlls you should upload them using the Additional Binaries section in the administration page:
It may depend on the wkhtmltopdf flavour you're using (you can check the details on Installation Instruction page of your HtmlToPdfConverter.

Here's a screenshot of mine (in my personal environment using mingw):

Hi Guilherme,

Sorry I missed this point. Could you please let me know how can i extract the binaries from the file that i have downloaded?
Using 7-zip as you suggested I have found the executable, but I'm not been able to find the Binaries.

Is it the same file? Or shall I downlaod another one?

I have checked all the directories inside the following file:

But i was unable to find them.

Many thanks for the help!


Hi Simone,

If you open the exe with 7-Zip (Right Click > Open WIth) you should see the inner folder structure and you can extract the library (in your case wkhtmltox.dll) from the bin folder.


Hi Guilherme,

Now it is perfectly working!

Many thanks for the help!!!


I'm having the same error:

Could not find file 'C:\Windows\TEMP\TEMPAYIPVTSITI.pdf'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.ReadAllBytes(String path)
   at OutSystems.NssHtmlConvertToPdf.CssHtmlConvertToPdf.MssGeneratePDF(String ssExecutablePath, String ssURL, String ssProxy, String ssOtherArgs, Byte[]& ssPDFBinary, String& ssMessageOutput)
   at ssHtmlToPdfConverter.RssExtensionHtmlConvertToPdf.MssGeneratePDF2(HeContext heContext, String inParamExecutablePath, String inParamURL, String inParamProxy, String inParamOtherArgs, Byte[]& outParamPDFBinary, String& outParamMessageOutput)
That's my installation

I've permissions on that folder for everyone to change it. What am I missing?
Hi Carlos,

The only thing weird I see is the FileType in your libraries. i believe it should be application/octet-stream instead of application/x-msdownload. What browser did you use for the upload?

I've just installed the latest wkhtml version 0.12.2 in my env without any issue. And just a note if you're using mingw version I believe you dont need wkhtmltox.dll in your libraries.


Hi Guilherme,

Thanks for the answer.

I've just uploaded again and the result is the same. I've tried a previous version and it's the same. 

I'm able to access the link that I want to convert to PDF. It was working before but now it's not. I don' understand why.

Help is needed :)
Hi Carlos,

Have you tried a previous version of the Html2Pdf component or the wkhtml library?

I'm uploading now (in a few minutes) a new version of the component to fix some issues identified by the community. I don't think it will fix your problem but you can give a try...

in the meantime do you have access to the server filesystem? Can you go into the HtmlToPdfConverter\binaries folder and open a command line and execute the exe directly? What was the result?

I've a previous version working for years and everything was ok (until now).

I've full control of the server. Executing the exe from the binaries folder, I've found that it was missing a dll from microsoft vc++ 2013 libraries (somthing like this). I've fixed that but the error keeps occuring. Though, I'm able to convert www.google.pt from the cmd but not from the demo page. It's weird!
I'm also getting this same kind of error. We're full OutSystems customers and we're using their cloud offering for hosting, so I don't have direct access to the servers. According to the upload page, the files uploaded just fine, but any time I try to use it, I get the same "can't be found" error.
Files Uploaded

Something interesting I noticed, too, was the file name in the error was different if I ran it from the html2pdfconverter module or if I ran it from my module that references it.
Error Screencap

This is very frustrating... is there a solution to this? What do I do if it's running on the OutSystems cloud?

Hi Len,

I'll do some tests on a Cloud Infrastrucure and I'll let you know my findings.

Hi Ken,

You're using the wkhtml version that depends on the msvc which might not be installed on your cloud environment. I don't have it on my pc and this is what I get:

So i tried the other version of wkhtml (the mingw one) and after uploading the binaries I successfully generated a pdf.

Can you try that version also?

Ah, that did the trick! Thank you!

Now, if only I can figure out how to get it to make a pdf of anything useful, that'd be great.
(See this lovely new thread I made:
http://www.outsystems.com/forums/discussion/13747/pdf-of-non-anonymous-pages/ )

Thanks Guys :)
 Hi Guillerme, how do I install the mingw on the Cloud Environment? We are running on a cloud platform of outsystems. I was only able to download the MingW version of wkhtmltopdfconverter and install in on my desktop to extract the binaries required for upload. I already followed this link which has steps by Steve Tilden.


Here are his instructions:

The steps I followed are as follows:
1. Download Wkhtmltopdf installer from http://wkhtmltopdf.org/downloads.html I used the windows MinGW version
2. Open the installer with 7zip or something similar and extract the following files:

3. Configure the environment to allow large files to be uploaded. This is achieved by downloading the espace from the forge named "Service Center Factory Configuration".
3.1 Open and launch the espace then create a new shared configuration.
3.2 Give the custom configuration a name like "Upload_Large_Files". There are some pre-made samples available so you can pre-populate the template as a starting point. I used the "Custom HttpRuntime Parameters (.NET). 
3.3 Set the "Kind" to web.config_XSL
3.4 in the value field you should have the following (or something similar)

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" indent="yes" encoding="UTF-8"/> 
    <xsl:template match="@*|node()">
            <xsl:apply-templates select="@*|node()"/>
    <xsl:template match="/configuration/system.web/httpRuntime">
            <xsl:apply-templates select="@*|node()"/>
            <xsl:attribute name="executionTimeout">360</xsl:attribute>
            <xsl:attribute name="maxRequestLength">65536</xsl:attribute>

Edit the values to allow a timeout and maxrequestlength that will allow the files to be uploaded. The default request length is only 4096kb so will need to be increased to 50000 or so.

3.4 Save the configuration
3.5 back on the Espaces tab of the factory configuration find the htmltopdfconverter espace and select it.
3.6 associate the newly created large file configuration with this eSpace.

4 You should now be able to launch the HTML2PDFConverter eSpace and upload the required files. 
4.1 Go to the administration page
4.2 upload wkhtmltopdf.exe to the pdf generator 
4.3 wait for it to upload
4.4 upload wkhtmltoimage to the image generator
4.5 wait....
4.6 upload the 4 dll's to the additional binaries area (one at a time)

5. You should now be able to produce pdf's and images using the pdf link and image link in the espace. If this is working you can simply add a reference to the espace in your own project and start prodicing PDF's etc.

I am also wondering, what version should I use? does it depend on the operating system of my laptop? because there are 32-bit and 64-bit versions of the wkhtmltopdf file.
Hi Lawerence,

You should use the 64 bit version of mingw and you need to upload the dlls (wkhtmltox.dll is not necessary) and the executables on the component admin page.

I've never had to change the request size on cloud infrastructures to be able to upload so it seems that you're strugling with more than that (the fact that it times out when uploading the XML file should be a good indicator that there's some kind of network issue)

I've experienced timeouts even in OutSystems office and it was due to internal firewall rules that were slowing my upload. As an alternative before contacting support you should try to upload the files from a different location (diferent network, wired, etc) and if you're not able then it needs to be analyzed.

Once you overcome those issues it should be pretty straight forward its just upload the binaries and use and we'll help in anyway possible.