Thanks for your response. Actually i would like to clarify here that we are doing one by one only.
we have for loop where we are taking one html at a time and converting to PDF, and doing this entire process as windows service which runs in the background.
Some time this service failed to run and when we start the services, we will have 500-600 files to process, but it does one by one through program.
My question here is how html2PDF command works internally,
Is the conversion happen immediately or its just put in some queue and then do it later?
Is your command takes few seconds delay for processing from your internal queue, if then do we need to delay our code to delete the source file.
we have checked your logs and came to know that it put it in some queue and then process one by one. what is mean by that?
And also we notice that from task manager that your htm2pdf.exe takes always 100% cpu when it execute. why its like that?
Note: we are using VeryPDF 2.1.0.2 version
can you please help us out here, its very urgent for one of our customer.
Waiting for your response.
Thanks & Regards,
Customer
------------------------------------------------
>>Is the conversion happen immediately or its just put in some queue and then do it later?
Doc2PDFCommandLine() function will deliver the conversion job to doc2pdf_service.exe application, doc2pdf_service.exe will put this new conversion job into a queue, and execute it at later. doc2pdf_service.exe application will call HTML2PDF.exe application to take conversion jobs in queue execute it one by one.
>>Is your command takes few seconds delay for processing from your internal queue, if then do we need to delay our code to delete the source file.
Yes, you can not delete the source file immediately. You can use Doc2PDFCommandLineEx to instead of Doc2PDFCommandLine function, Doc2PDFCommandLineEx will wait until conversion be done completely, after that, you can delete the source document safely,
PDFOUTLib.PdfCreatorClass pdfcom = new PDFOUTLib.PdfCreatorClass();
string cmd = """C:\inputfile.doc"" ""C:\outputfile.pdf"" ""paperType=9,pageWidth=1400,pageHeight=1400"""
pdfcom.Doc2PDFCommandLineEx(cmd, 1);
'OK, you can delete source document at here
DeleteFile("C:\inputfile.doc");
Doc2PDFCommandLineEx() function has two parameters, the first parameter is the command line, the second parameter is "IsWait", if you set "IsWait" to 1 or TRUE, Doc2PDFCommandLineEx() function will always wait until conversion be done completely, if you set "IsWait" to 0 or FALSE, Doc2PDFCommandLineEx() function will work same Doc2PDFCommandLine() function.
>>we have checked your logs and came to know that it put it in some queue and then process one by one. what is mean by that?
Yes, the conversion jobs will be putted into a queue and execute them one by one at later.
>>And also we notice that from task manager that your htm2pdf.exe takes always 100% cpu when it execute. why its like that?
What is the owner name of html2pdf.exe application? is it run as Administrator or System user account? we suggest you may run your service as Administrator to try again, this may reduce the CPU usage.