Hi,
This is in continuation to my thread Document converter 2.50d-3 - no PDF files being created!!! earlier in the forum.
I am using Amyuni document converter 2.50d-3, developer license.
I am able to get the batch convert to work from a .Net Windows application, but not from an ASP.Net WEB APPLICATION.
Below is the code from what I am trying to do.
- ASPNET user is an administrator on the web server.
- As advised earlier, I am using enable printer right before the batch convert call...
//
private void PrintToServer()
{
const string PDFPrinter = "Amyuni Document Converter";
const int NoPrompt = 1;
const int UseFileName = 2;
const string strLicencee = "XXXXXX";
const string strCode = "XXXXXXXXXX";
CDIntfEx.CDIntfExClass cdi = new CDIntfEx.CDIntfExClass();
string filepath = Server.MapPath("in.doc") ;
int j = cdi.DriverInit(PDFPrinter);
cdi.DefaultDirectory = Server.MapPath(".");
cdi.DefaultFileName = Server.MapPath("out.pdf");
cdi.FileNameOptionsEx = NoPrompt + UseFileName;
bool bSet = cdi.SetDefaultPrinter();
int k = cdi.EnablePrinter(strLicencee, strCode);
cdi.BatchConvert(filepath);
cdi.RestoreDefaultPrinter();
cdi.FileNameOptions = 0;
cdi.DriverEnd();
}
//
The batch convert call does not convert the word document to PDF.
There are no error messages. The web page doesnt do anything other than show a slow progress bar when BatchConvert is called.
Is there anything special we need to do to get the web application? any help is greatly appreciated.
thanks
asha
Batch Convert and ASP.Net application - not working
Hello,
The BatchConvert() function will launch the application that is associated with a specific file extension and issue a print (verb) command to convert the document. I do not believe that because of security constrains this type of functionality is possible with a web application.
In order to resolve your issue you will need to print to the PDF Converter through an instance of the application associated to the file extension of the document you want to print.
Hope this helps?
The BatchConvert() function will launch the application that is associated with a specific file extension and issue a print (verb) command to convert the document. I do not believe that because of security constrains this type of functionality is possible with a web application.
In order to resolve your issue you will need to print to the PDF Converter through an instance of the application associated to the file extension of the document you want to print.
Hope this helps?