Click here to Skip to main content
15,867,453 members
Articles / Web Development / IIS
Article

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

Rate me:
Please Sign up or sign in to vote.
1.75/5 (9 votes)
9 Apr 2007CPOL 42.6K   1K   14   7
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....

C#
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....

C#
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)


Written By
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

 
Question(I want to convert .indd file into .pdf . But it gives such type of error. I just have downloaded this and run in vs2012) Value cannot be null. Parameter name: type Pin
Ajit Kumar Pandit6-Apr-16 0:27
Ajit Kumar Pandit6-Apr-16 0:27 
QuestionGetting Exception on Exporting Interacive Elements Pin
bajwa66826-Aug-12 20:16
bajwa66826-Aug-12 20:16 
QuestionAdobe Indesign Version Pin
RajaSrirangan27-Jun-11 0:10
RajaSrirangan27-Jun-11 0:10 
Generalconverting EPS to indesign Pin
vidyas198215-Aug-10 22:27
vidyas198215-Aug-10 22:27 
GeneralHide InDesign Application while Its Instance is created Pin
Rashmi_Karnam26-Feb-10 0:23
Rashmi_Karnam26-Feb-10 0:23 
Generalgetting an error using this code which is incurable Pin
gopal_Pandey24-Oct-07 0:35
gopal_Pandey24-Oct-07 0: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? Pin
gri9-Apr-07 21:02
gri9-Apr-07 21:02 

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

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