Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Server Developers
Viewing all articles
Browse latest Browse all 20709

InDesign.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

$
0
0

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.


Viewing all articles
Browse latest Browse all 20709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>