Click here to Skip to main content
Click here to Skip to main content

Use Adobe's Indesign COM in asp.net application with automatic publication flow

, 9 Apr 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
This Article represents that .net based application which is used in web based publication work flow with the use of XML and indesign file

Introduction

This code is use ful for automatic publication flow with the use of desing and xml templte with the support of Indesing (An Adobe's tool).

Background

use this application need to indesign and indesign SDK need to be installed on your Machine...
and then need to add indesign related reference of indesign(COM)

Using the code

Use this application need to indesign and indesign SDK need to be installed on your Machine... and then need to add indesign related reference of indesign(COM).

Here with applicatin three files 1. Indd this is design template and 2. XML that is xml tempate... we can change any data with same structure and import it and we can generate its PDF..3. Image file which is used in Indd file and its path was specifiled in XML file here indd and xml file are attched by use of indesign tool....

Type indAppType = 
   Type.GetTypeFromProgID("InDesign.Application");

InDesign.Application objInDesign = 
  (InDesign.Application)Activator.CreateInstance(indAppType, true);

InDesign.Document objDoc = 
  (InDesign.Document)objInDesign.Open(cstrInddFile, false);

For this line activate indesign application ..

This is for importing an XML file....

objDoc.ImportXML(cstrXMLFile);

//this is used for get presets which is used to export PDF..
//if not availble the create Preset and give name at here....
//InDesign.PDFExportPreset objPreset = 
//   (InDesign.PDFExportPreset)objInDesign.PDFExportPresets.LastItem();

//this code is used for final PDF
objDoc.Export(idExportFormat.idPDFType, cstrOutputFile, false, 
              objInDesign.PDFExportPresets["Press"]);
              //works fine

Points of Interest

This is the one simple basic work flow for automatic publication flow... we can also implement so many functionality with use of Indesing.

License

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

Share

About the Author

Amit M patel
Technical Lead Accenture Services
India India
I have total more then 6.6 years of IT Industry experience....
 
I have comlated my Diploma in Computern Engineering in 2003...
 
I have also cleared Microsoft Certified Professional Developer Specailist Exams for enterprise edition.
 
I have also cleared Microsoft Certified Technologies Specailist Exams for web,window and distribute application
 
I have write couple of article regarding .net,asp.net,SSRS, Documentum, COM,DCOM,web services,Indesign Server SDK which is published in many web sites.....
 
I have worked on differnet patterns like Factory, Decorative, facade, MVP.

Comments and Discussions

 
QuestionGetting Exception on Exporting Interacive Elements Pinmemberbajwa66826-Aug-12 21:16 
QuestionAdobe Indesign Version PinmemberRajaSrirangan27-Jun-11 1:10 
Generalconverting EPS to indesign Pinmembervidyas198215-Aug-10 23:27 
GeneralHide InDesign Application while Its Instance is created PinmemberRashmi_Karnam26-Feb-10 1:23 
Generalgetting an error using this code which is incurable Pinmembergopal_Pandey24-Oct-07 1:35 
Hi,

I read your "Use Adobe's Indesign COM in asp.net application with automatic publication flow" and i found it very interesting one...
 
I am using this code for implementing the trial version of Adobe Indesign CS2.
 
I am getting an error "System.UnauthorizedAccessException: Access is denied."
 
I have set the permission of that folder and file to every access rights what it needed to run but it is not implementing that code and giving the same error..
 
Now please tell me about this and after that what to do to solve this error.......
 
Bye...
QuestionDesign broken? Pinmembergri9-Apr-07 22:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141220.1 | Last Updated 10 Apr 2007
Article Copyright 2007 by Amit M patel
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid