Philippe graca’s Weblog

May 23, 2008

Quickly create Adobe® InDesign® documents via simple XML files or programmatically in .Net

Introduction

InDesign CS features the ability to export files in the “InDesign Interchange,” or INX format. An INX file is an XML file that completely describes a given InDesign document. All pages, margins, guides, page items, text frames, colors, and anything else you can have in an InDesign document are included in the INX file.

HyperObjects has developed a new component called InxBuilder.

InxBuilder is an ideal library for developers looking to enhance their applications with dynamic INX document generation. InxBuilder is not an end-user tool. Typically you won’t use it on your Desktop as you would use Adobe InDesign or any other Publishing application. Rather, you’ll build InxBuilder into your own applications so that you can automate the INX creation process. For instance in one or more of the following situations:

  • Due to time or size, the InDesign documents can’t be produced manually.
  • The content of the document must be calculated or based on user input.
  • The content needs to be customized or personalized.
  • The content can be provided in multiple languages for the same layout
  • Documents are to be created in “batch process” mode.

You can use InxBuilder to:

  • Generate dynamic documents from XML files or databases
  • Add tables, page numbers, watermarks, etc.
  • Rotate your content
  • And much more…

In short: the InxBuilder classes are very useful for people who need to generate InDesign documents containing text, lists, tables and images. You will be able to transform an XML (Close to HTML) file into INX format or programmatically create a catalog from scratch.

InxBuilder requires .Net 2.0.

Generating INX files from HTML “like” documents

Basics

This example creates a INX document with two pages.
Each page of the XML document must have at least one region (this region type is Body).
The value of attribute type in PAGE tag can be:

  • simple-page: this XML page corresponds to one page in INX document;
  • repeatable-page: this XML page corresponds to one or several pages in INX document.

The value of attribute type in REGION tag can be:

  • body: the central part of the page (required). Its size is defined by attribute margin. If attribute margin is missing then the region size equals to page size;
  • before: the header page;
  • after: the footer page.
<DOCUMENT>
  <PAGE type="simple-page">
    <REGION type="body"></REGION>

  </PAGE>
  <PAGE type="simple-page">
    <REGION type="body"></REGION>
  </PAGE>
</DOCUMENT>

Result in InDesign:

Adding text

This example creates a INX document with one page containing a text.

<DOCUMENT>
  <PAGE type="simple-page">
    <REGION type="body">

      <P ax="5cm" ay="5cm" font-family="Arial" font-size="24pt" color="cmyk(0,0,0,1)">
        Text added in INX file

      </P>
      <P ax="5cm" ay="10cm" font-family="Courrier" font-size="20pt" color="cmyk(1,1,0,0)">
        Text added in INX file

      </P>
    </REGION>
  </PAGE>
</DOCUMENT>

Result in InDesign:

Adding image

This example creates a INX document with one page containing an image.
The image directory must be in the same directory of xml document

<DOCUMENT>
  <PAGE type="simple-page">
    <REGION type="body">
      <BLOCK ax="5cm" ay="5cm">

        <IMG src=".\Images\HO.png" />
      </BLOCK>
      <BLOCK ax="5cm" ay="10cm">
        <IMG src=".\Images\HO.jpg" />

      </BLOCK>
    </REGION>
  </PAGE>
</DOCUMENT>

Result in InDesign:

Adding table

This example creates a INX document with one page containing a table (3 columns and 2 rows).

<<DOCUMENT>
  <PAGE type="simple-page">
    <REGION type="body">
      <BLOCK ax="5cm" ay="5cm">

        <ARRAY widths="100pt,200pt,70pt" border="2pt solid cmyk(0,0,0,1)">
          <ROW height="50pt" border-bottom="2pt solid cmyk(0,0,0,1)">
            <COL colspan="2" border-right="2pt solid cmyk(0,0,0,1)" />

            <COL rowspan="2"/>
          </ROW>
          <ROW height="70pt">
            <COL border-right="2pt solid cmyk(0,0,0,1)" />

            <COL border-right="2pt solid cmyk(0,0,0,1)" />
          </ROW>
        </ARRAY>
      </BLOCK>
    </REGION>

  </PAGE>
</DOCUMENT>

Result in InDesign:

Adding Multi column support

This example creates a INX document with 2 columns in the first page.

<DOCUMENT>
  <PAGE type="simple-page">

    <REGION type="body" column-count="2" column-gap="1cm">
      <P font-size="24pt" font-family="Arial" color="cmyk(0,0,0,1)" margin-top="750pt">

        Text too long<BR/>
        Text too long<BR/>
        Text too long<BR/>

        Text too long<BR/>
        Text too long<BR/>
        Text too long<BR/>

        Text too long<BR/>
        Text too long<BR/>
        Text too long<BR/>

        Text too long<BR/>
        Text too long<BR/>
        Text too long<BR/>

        Text too long<BR/>
        Text too long<BR/>
        Text too long
      </P>

    </REGION>
  </PAGE>
</DOCUMENT>

Result in InDesign:

Generating a document programmatically

For each example, the library “HyperObjects.Inx” assembly is imported.

using HyperObjects.Inx;

Basics

This example creates a INX document with one pages.
The page width equals 300 pt and page height equals 500 pt.

string lastError = string.Empty;// The last error message
// Validate the license of INX Builder

string license "..."// license for INX Builder
InxUtils.ValidateLicense(license);
if (InxUtils.LastError != null && InxUtils.LastError.Length > 0)
{

  // INX Builder is not available with the given license
  lastError InxUtils.LastError;
}
else
{

  try
  {
    DocumentProperties docProperties = new DocumentProperties()// Create default document properties
    docProperties.Country "GB"// Update country of INX document

    docProperties.Language "en"// Update language of INX document
    docProperties.PageSizeGeneric = new InxSize(300500)// Update page size (width = 300 pt, height = 500 pt)

    using (InxDocument inxDoc = new InxDocument(docProperties)) // Create INX document
    {
      // Create the first spread
      InxSpread inxSpread1 = new InxSpread(inxDoc);


      // Create the first page
      InxPage inxPage1 = new InxPage(new PageProperties("Page1", PageProperties.PageTypes.SIMPLE_PAGE), new InxCommonProperties(), inxSpread1);


      // Create the second spread
      InxSpread inxSpread2 = new InxSpread(inxDoc);

      // Create the second page
      InxPage inxPage2 = new InxPage(new PageProperties("Page2", PageProperties.PageTypes.SIMPLE_PAGE), new InxCommonProperties(), inxSpread2);


      // Create the third page
      InxPage inxPage3 = new InxPage(new PageProperties("Page3", PageProperties.PageTypes.SIMPLE_PAGE), new InxCommonProperties(), inxSpread2);


      // Transform INX object to xml
      inxDoc.AddXmlObject(null);
      if (inxDoc.LastError != null && inxDoc.LastError.Length > 0)

      {
        lastError inxDoc.LastError;
        return;
      }

      // Output INX file
      string outputFile Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ExamplePage.inx");

      FileInfo fi = new FileInfo(outputFile);
      // Delete INX file
      if (fi.Exists)
        fi.Delete();
      // Save xml document (inx format)

      if (inxDoc.Document != null)
        inxDoc.Document.Save(outputFile);
    }
  }
  catch (Exception exc)
  {
    lastError exc.Message; 

  }
}

Result in InDesign

Adding text

This example creates a INX document with one pages containing text.

string lastError = string.Empty// The last error message
// Validate the license of INX Builder

string license "..."// license for INX Builder
InxUtils.ValidateLicense(license);
if (InxUtils.LastError != null && InxUtils.LastError.Length > 0)
{

  // INX Builder is not available with the given license
  lastError InxUtils.LastError;
}
else
{

  try
  {
    DocumentProperties docProperties = new DocumentProperties()// Create default document properties
    docProperties.Country "GB"// Update country of INX document

    docProperties.Language "en"// Update language of INX document
    docProperties.PageSizeGeneric = new InxSize(400600)// Update page size (width = 400 pt, height = 600 pt)

    using (InxDocument inxDoc = new InxDocument(docProperties)) // Create INX document
    {
      inxDoc.PaddingBottomDflt 2// Update default padding on the bottom side in pt

      inxDoc.PaddingTopDflt 2// Update default padding on the top side in pt
      inxDoc.DefaultFamily "Arial"// Update default font family


      // Create spread
      InxSpread inxSpread = new InxSpread(inxDoc);

      // Create page
      InxCommonProperties cProperties = new InxCommonProperties()// Create default common properties

      cProperties.Margin = new Margins(10101010)// Update page margin (10 pt,10 pt,10 pt,10 pt)

      InxPage inxPage = new InxPage(new PageProperties("Page", PageProperties.PageTypes.SIMPLE_PAGE), cProperties, inxSpread)// Create INX page


      // Create container
      cProperties = new InxCommonProperties()// Create default common properties
      cProperties.Origin = new InxPoint(9050)// Update origin (90 pt, 50 pt)

      cProperties.Size = new InxSize(200200)// Update size (width = 200 pt, height = 200 pt)

      cProperties.VerticalAlign InxCommonProperties.VerticalJustification.cent// Update vertical justification (center)
      InxContainer inxContainer = new InxContainer(new ContainerProperties("Container"), cProperties, inxPage)// Create INX container


      // Create text (Arial, bold, 20 pt, black)
      cProperties = new InxCommonProperties()// Create default common properties

      cProperties.CurrentFont = new InxFont("Arial"20)// Update font (family: Arial, font size: 20 pt)

      cProperties.CurrentFont.IsBold = true; // Update font style (bold)
      cProperties.Color = new ColorCMYK(0001)// Update font color (black)

      cProperties.HorizontalAlign InxCommonProperties.HorizontalJustification.cent// Update horizontal justification (center)
      string text "INX text<BR /><BR />";

      InxText inxText = new InxText(new TextProperties(text), cProperties, inxContainer)// Create INX text

      // Add text (Arial, 12 pt, red)

      text "Added text with font size of 12 pt and font color is red.<BR />";

      inxText.AddText(text, new InxFont("Courier New"12), new ColorCMYK(0110))// Add text with new font (family: Courier New, font size: 12 pt, font color: red)


      // Transform INX object to xml
      inxDoc.AddXmlObject(null);
      if (inxDoc.LastError != null && inxDoc.LastError.Length > 0)

      {
        lastError inxDoc.LastError;
        return;
      }

      // Output INX file
      string outputFile Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ExampleText.inx");

      FileInfo fi = new FileInfo(outputFile);
      // Delete INX file
      if (fi.Exists)
        fi.Delete();
      // Save xml document (inx format)

      if (inxDoc.Document != null)
        inxDoc.Document.Save(outputFile);
    }
  }
  catch (Exception exc)
  {
    lastError exc.Message;

  }
}

Result in InDesign:

Adding image

This example creates a INX document with one pages containing image.
The image type can be JPEG, GIF, BMP, PNG or TIFF.

string lastError = string.Empty// The last error message
// Validate the license of INX Builder

string license "..."// license for INX Builder
InxUtils.ValidateLicense(license);
if (InxUtils.LastError != null && InxUtils.LastError.Length > 0)
{

  // INX Builder is not available with the given license
  lastError InxUtils.LastError;
}
else
{

  try
  {
    DocumentProperties docProperties = new DocumentProperties()// Create default document properties
    docProperties.Country "GB"// Update country of INX document

    docProperties.Language "en"// Update language of INX document
    docProperties.PageSizeGeneric = new InxSize(400600)// Update page size (width = 400 pt, height = 600 pt)

    using (InxDocument inxDoc = new InxDocument(docProperties)) // Create INX document
    {
      // Create spread
      InxSpread inxSpread = new InxSpread(inxDoc);


      // Create page
      InxCommonProperties cProperties = new InxCommonProperties()// Create default common properties
      cProperties.Margin = new Margins(10101010);  // Update page margin (10 pt,10 pt,10 pt,10 pt)

      InxPage inxPage = new InxPage(new PageProperties("Page", PageProperties.PageTypes.SIMPLE_PAGE), cProperties, inxSpread)// Create INX page


      // Create container image (HO.jpg)
      cProperties = new InxCommonProperties()// Create default common properties
      cProperties.Origin = new InxPoint(2020)// container origin (20,20) in pt

      cProperties.Size = new InxSize(160107)// container width = 160 pt, container height = 107 pt

      InxContainer inxContainerImage = new InxContainer(new ContainerProperties("Container"), cProperties, inxPage)// Create INX container

      // Create image (HO.jpg)

      string image Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Images"), "HO.jpg")// Retrieve image path
      cProperties = new InxCommonProperties()// Create default common properties

      cProperties.Size = new InxSize(160107)// Update container size of image (width = 160 pt, height = 107 pt)

      ImageProperties imgProperties = new ImageProperties()// Create default image properties
      imgProperties.Url image// Update image url

      imgProperties.Name "HO.jpg"// Update image name
      imgProperties.LibraryName "Images"// Update library name of image

      imgProperties.ImageResolution = new InxSize(7272)// Update image resolution (horizontal resolution = 72 dpi, vertical resolution = 72 dpi)

      imgProperties.ImageType ImageProperties.ImageTypes.JPEG// Update image type (JPEG)
      imgProperties.ImageFormatType ImageProperties.FormatTypes.RGB// Update image format (RGB)

      imgProperties.ImageSize = new InxSize(160107)// Update image size (width = 160 pt, height = 107 pt)

      InxImage inxImage = new InxImage(imgProperties, cProperties, inxContainerImage)// Create INX image

      // Transform INX object to xml

      inxDoc.AddXmlObject(null);
      if (inxDoc.LastError != null && inxDoc.LastError.Length > 0)
      {
        lastError inxDoc.LastError;

        return;
      }

      // Output INX file
      string outputFile Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ExampleImage.inx");
      FileInfo fi = new FileInfo(outputFile);

      // Delete INX file
      if (fi.Exists)
        fi.Delete();
      // Save xml document (inx format)
      if (inxDoc.Document != null)

        inxDoc.Document.Save(outputFile);
    }
  }
  catch (Exception exc)
  {
    lastError exc.Message;
  }
}

Result in InDesign:

Adding table

This example creates a INX document with one pages containing table.
The cell (0,1) has 2 columns spanned.
The cell (1,1) has 2 rows spanned.

string lastError = string.Empty// The last error message
// Validate the license of INX Builder

string license "..."// license for INX Builder
InxUtils.ValidateLicense(license);
if (InxUtils.LastError != null && InxUtils.LastError.Length > 0)
{

  // INX Builder is not available with the given license
  lastError InxUtils.LastError;
}
else
{

  try
  {
    DocumentProperties docProperties = new DocumentProperties()// Create default document properties
    docProperties.Country "GB"// Update country of INX document

    docProperties.Language "en"// Update language of INX document
    docProperties.PageSizeGeneric = new InxSize(400600)// Update page size (width = 400 pt, height = 600 pt)

    using (InxDocument inxDoc = new InxDocument(docProperties)) // Create INX document
    {
      // Create spread
      InxSpread inxSpread = new InxSpread(inxDoc);


      // Create page
      InxCommonProperties cProperties = new InxCommonProperties()// Create default common properties
      cProperties.Margin = new Margins(10101010);  // Update page margin (10 pt,10 pt,10 pt,10 pt)

      InxPage inxPage = new InxPage(new PageProperties("Page", PageProperties.PageTypes.SIMPLE_PAGE), cProperties, inxSpread)// Create INX page


      // Create container for table
      cProperties = new InxCommonProperties()// Create default common properties
      cProperties.Origin = new InxPoint(2040)// Update container origin (20 pt, 40 pt)

      // Remarks:
      //    - Container width >= Table width + Table border left / 2 + Table border right / 2

      //    - Container height >= Table height + Table border top / 2 + Table border bottom / 2

      cProperties.Size = new InxSize(332312)// Update container size (width = 332 pt, height = 312 pt)

      InxContainer inxContainer = new InxContainer(new ContainerProperties("ContainerTable"), cProperties, inxPage);

      // Create table
      cProperties = new InxCommonProperties()// Create default common properties

      // remarks:
      //    - Table origin X = Table border left / 2
      //    - Table origin Y = Table border top / 2

      cProperties.Origin = new InxPoint(11)// Update table origin (1 pt, 1 pt)

      TableProperties tabProperties = new TableProperties()// Create default table properties
      tabProperties.ColumnWidths = new double[] { 10015080 }// Update column widths (3 columns, widths: 100 pt, 150 pt, 80 pt)

      tabProperties.RowHeights = new double[] { 10012090 }// Update row heights (3 rows, heights: 100 pt, 120 pt, 90 pt)


      // Build cell border (width = 2pt, style = solid, color = black)
      Border bTop = new Border(Border.BorderTypes.TOP, 2, Border.BorderStyles.Solid, new ColorCMYK(0001))// Top border

      Border bLeft = new Border(Border.BorderTypes.LEFT, 2, Border.BorderStyles.Solid, new ColorCMYK(0001))// Left border

      Border bRight = new Border(Border.BorderTypes.RIGHT, 2, Border.BorderStyles.Solid, new ColorCMYK(0001))// Right border

      Border bBottom = new Border(Border.BorderTypes.BOTTOM, 2, Border.BorderStyles.Solid, new ColorCMYK(0001))// Bottom border


      // Update properties of cell (0,0)
      tabProperties.SetCellBorders(new Borders(bTop, nullnull, bLeft), new InxCellPosition(00))// Update cell borders

      // Update properties of cell (0,1)
      tabProperties.SetColSpan(2new InxCellPosition(01))// Update columns spanned count (2 columns)

      tabProperties.SetCellBorders(new Borders(bTop, bRight, null, bLeft), new InxCellPosition(01))// Update cell borders

      // Update properties of cell (1,0)
      tabProperties.SetCellBorders(new Borders(bTop, nullnull, bLeft), new InxCellPosition(10))// Update cell borders

      // Update properties of cell (1,1)
      tabProperties.SetRowSpan(2new InxCellPosition(11))// Update rows spanned count (2 rows)

      tabProperties.SetCellBorders(new Borders(bTop, null, bBottom, bLeft), new InxCellPosition(11))// Update cell borders

      // Update properties of cell (1,2)
      tabProperties.SetCellBorders(new Borders(bTop, bRight, null, bLeft), new InxCellPosition(12))// Update cell borders

      // Update properties of cell (2,0)
      tabProperties.SetCellBorders(new Borders(bTop, null, bBottom, bLeft), new InxCellPosition(20))// Update cell borders

      // Update properties of cell (2,2)
      tabProperties.SetCellBorders(new Borders(bTop, bRight, bBottom, bLeft), new InxCellPosition(22))// Update cell borders

      InxTable inxTable = new InxTable(tabProperties, cProperties, inxContainer)// Create INX table

      // Create row 0
      cProperties = new InxCommonProperties()// Create default common properties

      cProperties.Size = new InxSize(330100)// Update row size (width = 330 pt, height = 100 pt)

      InxRow inxRow = new InxRow(cProperties, inxTable)// Create INX row

      // Create cell (0,0)
      cProperties = new InxCommonProperties()// Create default common properties

      cProperties.BackgroundColor = new ColorCMYK(0000.25)// Update background color (grey)

      InxCell inxCell = new InxCell(cProperties, inxRow);
      // Create cell (0,1)
      cProperties = new InxCommonProperties()// Create default common properties

      cProperties.BackgroundColor = new ColorCMYK(0000.5)// Update background color (grey)

      inxCell = new InxCell(cProperties, inxRow);

      // Create row 1
      cProperties = new InxCommonProperties()// Create default common properties

      cProperties.Size = new InxSize(330120)// Update row size (width = 330 pt, height = 120 pt)

      inxRow = new InxRow(cProperties, inxTable)// Create INX row

      // Create cell (1,0)
      inxCell = new InxCell(new InxCommonProperties(), inxRow);

      // Create cell (1,1)
      inxCell = new InxCell(new InxCommonProperties(), inxRow);
      // Create cell (1,1)
      inxCell = new InxCell(new InxCommonProperties(), inxRow);


      // Create row 2
      cProperties = new InxCommonProperties()// Create default common properties
      cProperties.Size = new InxSize(33090)// Update row size (width = 330 pt, height = 90 pt)

      inxRow = new InxRow(cProperties, inxTable)// Create INX row

      // Create cell (2,0)
      inxCell = new InxCell(new InxCommonProperties(), inxRow);

      // Create cell (2,2)
      inxCell = new InxCell(new InxCommonProperties(), inxRow);

      // Transform INX object to xml

      inxDoc.AddXmlObject(null);
      if (inxDoc.LastError != null && inxDoc.LastError.Length > 0)
      {
        lastError inxDoc.LastError;

        return;
      }

      // Output INX file
      string outputFile Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ExampleTable.inx");
      FileInfo fi = new FileInfo(outputFile);

      // Delete INX file
      if (fi.Exists)
        fi.Delete();
      // Save xml document (inx format)
      if (inxDoc.Document != null)

        inxDoc.Document.Save(outputFile);
    }
  }
  catch (Exception exc)
  {
    lastError exc.Message;
  }
}

result in InDesign:

Adding Multi column support

This example creates a INX document with one pages containing 2 columns.

string lastError = string.Empty// The last error message
// Validate the license of INX Builder

string license "..."// license for INX Builder
InxUtils.ValidateLicense(license);
if (InxUtils.LastError != null && InxUtils.LastError.Length > 0)
{

  // INX Builder is not available with the given license
  lastError InxUtils.LastError;
}
else
{

  try
  {
    DocumentProperties docProperties = new DocumentProperties()// Create default document properties
    docProperties.Country "GB"// Update country of INX document

    docProperties.Language "en"// Update language of INX document
    docProperties.PageSizeGeneric = new InxSize(400600)// Update page size (width = 400 pt, height = 600 pt)

    using (InxDocument inxDoc = new InxDocument(docProperties)) // Create INX document
    {
      // Create spread
      InxSpread inxSpread = new InxSpread(inxDoc);


      // Create page
      InxCommonProperties cProperties = new InxCommonProperties()// Create default common properties
      cProperties.Margin = new Margins(10101010);  // Update page margin (10 pt,10 pt,10 pt,10 pt)

      InxPage inxPage = new InxPage(new PageProperties("Page", PageProperties.PageTypes.SIMPLE_PAGE), cProperties, inxSpread)// Create INX page


      // Create the first column
      cProperties = new InxCommonProperties()// Create default common properties
      cProperties.Origin = new InxPoint(1010)// Region origin equals (10 pt, 10 pt)

      cProperties.Size = new InxSize(170580)// Region width = 170 pt, region height = 580 pt

      InxContainer inxContainer1 = new InxContainer(new ContainerProperties(), cProperties, inxPage)// Create INX container

      // Create the second column

      cProperties = new InxCommonProperties()// Create default common properties
      cProperties.Origin = new InxPoint(22010)// Region origin equals (220 pt, 10 pt)

      cProperties.Size = new InxSize(170580)// Region width = 170 pt, region height = 580 pt

      InxContainer inxContainer2 = new InxContainer(new ContainerProperties(), cProperties, inxPage)// Create INX container

      // Attach two containers

      inxContainer2.PreviousContainer inxContainer1;
      inxContainer1.NextContainer inxContainer2;

      // Create text (Arial, bold, 20 pt, black)
      cProperties = new InxCommonProperties()// Create default common properties

      cProperties.CurrentFont = new InxFont("Arial"20)// Update font (family: Arial, font size: 20 pt)

      cProperties.CurrentFont.IsBold = true; // Update font style (bold)
      cProperties.Color = new ColorCMYK(0001)// Update font color (black)

      string text "Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />";

      text +"Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />";

      text +"Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />";

      text +"Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long<br />Text too long";

      InxText inxText = new InxText(new TextProperties(text), cProperties, inxContainer1)// Create INX text

      // Transform INX object to xml

      inxDoc.AddXmlObject(null);
      if (inxDoc.LastError != null && inxDoc.LastError.Length > 0)
      {
        lastError inxDoc.LastError;

        return;
      }

      // Output INX file
      string outputFile Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ExampleMultiColumns.inx");
      FileInfo fi = new FileInfo(outputFile);

      // Delete INX file
      if (fi.Exists)
        fi.Delete();
      // Save xml document (inx format)
      if (inxDoc.Document != null)

        inxDoc.Document.Save(outputFile);
    }
  }
  catch (Exception exc)
  {
    lastError exc.Message;
  }
}

Result in InDesign:

Conclusion

With InxBuilder, you are now able to create DTP documents without the need to be an Indesign expert. You can push your database content to creative agencies in their preferred format.

For more information about the component and how to buy, visit http://www.inxbuilder.com

1 Comment »

  1. Excellently. Very interestingly. I was recently interested in this topic. Very interesting and informative. I wish more such articles on this portal.Thanks for the article.

    Comment by Bob — September 16, 2010 @ 10:53 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.