Click here to Skip to main content
15,851,387 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i am trying to convert a HTML file to PDF in my application using the below code

C++
csHTMLToPDFCommand.Format( _T( "wkhtmltopdf.exe %s %s", _T( "TempPrint.htm"), _T( "D:\\Temp" ) );
STARTUPINFO sInfo; 
ZeroMemory( &sInfo, sizeof( sInfo ));
PROCESS_INFORMATION pInfo; 
ZeroMemory( &pInfo, sizeof( pInfo ));
sInfo.cb = sizeof( sInfo );
sInfo.dwFlags = STARTF_USESTDHANDLES;
sInfo.hStdInput = NULL; 
if( !::CreateProcess( 0, csHTMLToPDFCommand.GetBuffer(), 0, 0, TRUE, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, 0, 0, &sInfo, &pInfo ))
                {
                    DWORD dwError;
                    dwError = GetLastError();
                }


The PDF file is not created in the path specified. but create Process doesnt return any error either.

can anyone help me with what could be the problem..
Posted

1 solution

Issue got fixed.
i had to run an installer for the exe before running it Smile | :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900