Hello all,
am trying to convert .indd file to PDF file using following code....
string cstrInddFile = Server.MapPath("~/Indesing-doc/DesingTemplate.indd");
string cstrXMLFile = Server.MapPath("~/Indesing-doc/xml11.xml");
string cstrOutputFile = Server.MapPath("~/Indesing-doc/out1.pdf");
Type indAppType = Type.GetTypeFromProgID("InDesign.Application");
InDesign.Application objInDesign = (InDesign.Application)Activator.CreateInstance(indAppType, true);
InDesign.Document objDoc = (InDesign.Document)objInDesign.Open(cstrInddFile, false);
objDoc.ImportXML(cstrXMLFile);
InDesign.PDFExportPreset objPreset = (InDesign.PDFExportPreset)objInDesign.PDFExportPresets.LastItem();
objDoc.Export(idExportFormat.idPDFType, cstrOutputFile, false, objInDesign.PDFExportPresets["Press"]);
i got the error like InDesign.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
can any one please help me.
am using OS: Microsoft XP Professional.
Thank in advance.