<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Publishing with Silicon &#187; InDesign</title>
	<atom:link href="http://www.publishingsilicon.com/tag/indesign/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.publishingsilicon.com</link>
	<description>Max Dunn&#039;s electronic publishing blog: reconciling information and rendition technologies</description>
	<lastBuildDate>Tue, 29 Jun 2010 04:06:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting InDesign Content into Kindle</title>
		<link>http://www.publishingsilicon.com/2009/11/getting-indesign-content-into-kindle/</link>
		<comments>http://www.publishingsilicon.com/2009/11/getting-indesign-content-into-kindle/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 00:59:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[InDesign]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[Digital Editions]]></category>
		<category><![CDATA[ePubs]]></category>

		<guid isPermaLink="false">http://www.publishingsilicon.com/?p=63</guid>
		<description><![CDATA[Explanation of a process to convert InDesign to Kindle as explained at Adobe MAX 2009, as well as difficulties faced when trying to automate this process.]]></description>
			<content:encoded><![CDATA[<p>At the Adobe MAX 2009 conference, one of the coolest sessions I attended was &#8220;Creating an eBook for Distribution on Sony Reader Digital Book, Amazon Kindle, and Apple iPhone&#8221; by Colin Fleming. <a href="http://2009.max.adobe.com/online/session/238" target="_blank">The recording</a> is online, among the many sessions available through the <a href="http://2009.max.adobe.com/online/session/238">MAX 2009 Conference Scheduler</a>. <a href="http://blogs.adobe.com/scratchdisk/2009/10/indesign_to_epu.html">Colin&#8217;s blog post on the subject</a> includes sample files.</p>
<p>Now this is quite cool, given a manual workflow. Just one problem&#8230; our company never wants to do anything manually, we want to automate everything. So on the surface, it appeared that we could probably just do this using InDesign Server, at least the export to Digital Editions. However, no such luck.</p>
<p>It turns out that the feature to export to Digital Editions, which does most of the work, is implemented via JavaScript. This piece of InDesign is in the Scripts &gt; XHTML For Digital Editions folder, and it is compiled JavaScript, the wonderful jsxbin format that lets one distribute scripts without letting users view source or know what parameters the script expects.</p>
<p>Therefore, in order to automate this, one would have to guess the parameters to pass to the scripts. No documentation, and no source for the scripts, is yet available from Adobe. Why did they even put these scripts into the InDesign Server application? It is only usable from the desktop application, and only from the UI.</p>
<p>Olav Kvern was quick to tell me that he will help correct this problem. I look forward to seeing either source for the scripts or at least documentation on how to run them from code. Then we will be half way there in fully automating conversion to Kindle: of course the setup of source InDesign documents is important, too.</p>
<p>The other half is figuring out how to automate the step that <a href="http://calibre.kovidgoyal.net/">Calibre</a> takes care of in the process. At least that is open source.</p>
<p>I am thrilled that Adobe builds parts of InDesign with scripting: we have long maintained that scripting should be a first-class citizen with C++, and this proves our point. But they should not abandon the extensibility and complete exposure to automation that make InDesign and InDesign Server the first-class tools that they are.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.publishingsilicon.com%2F2009%2F11%2Fgetting-indesign-content-into-kindle%2F&amp;linkname=Getting%20InDesign%20Content%20into%20Kindle"><img src="http://www.publishingsilicon.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.publishingsilicon.com/2009/11/getting-indesign-content-into-kindle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IDML Resources</title>
		<link>http://www.publishingsilicon.com/2009/11/idml-resources/</link>
		<comments>http://www.publishingsilicon.com/2009/11/idml-resources/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 00:34:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[InDesign]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[IDML]]></category>

		<guid isPermaLink="false">http://www.publishingsilicon.com/?p=46</guid>
		<description><![CDATA[IDML resources posted to the IDML Developers Group]]></description>
			<content:encoded><![CDATA[<p>I finally posted to the <a href="http://tech.groups.yahoo.com/group/idml-developers/">IDML Developers Group</a> that I started on Yahoo. I hope this group takes off as developers begin to use IDML more frequently in InDesign automation.</p>
<p>IDML is wonderful, but it doesn&#8217;t on its own do quite everything one has to do to compose and edit dynamic documents. While you can define text and formats in a Story, for example, there is not a pure IDML-based approach to managing in-flow continued headers or copyfitting of text. You can&#8217;t use IDML alone to conditionally fill space based on how text flowed: IDML essentially instructs InDesign what to flow into a document, but it is not so different than MIF, XSL-FO, or other document descriptions that often require a two-pass approach to document composition (XSL-FO in some implementations does have extensions that go further than MIF or IDML in this respect): flow the content with IDML then clean things up and reflow based on scripting or plugin-based automation. It would be nice to see the page description itself include such state-based features.</p>
<p>While there are tactics that one can use to include metadata in IDML that round trips with documents, it would also be nice if IDML were more extensible in terms of allowing object-level metadata to persist when the IDML document is round-tripped with InDesign.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.publishingsilicon.com%2F2009%2F11%2Fidml-resources%2F&amp;linkname=IDML%20Resources"><img src="http://www.publishingsilicon.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.publishingsilicon.com/2009/11/idml-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>InDesign Scripting with VBA Example</title>
		<link>http://www.publishingsilicon.com/2009/11/indesign-scripting-with-vba-example/</link>
		<comments>http://www.publishingsilicon.com/2009/11/indesign-scripting-with-vba-example/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 07:57:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[InDesign]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://www.publishingsilicon.com/?p=37</guid>
		<description><![CDATA[Discussion of VBA vs. JavaScript scripting of InDesign]]></description>
			<content:encoded><![CDATA[<p>I was pleased to see that <a href="http://www.siliconpublishing.com/InDesign/CatalogExample.htm">my old example</a> still runs in CS4. Using VBA was very cool, it just suffered from dependency on Windows. But functionally we did many applications back in the early days of InDesign that worked just great with VBA. I think it was VB and AppleScript prior to JS and the cross-platform scripting? Let me go look that up.</p>
<p>In any case while JS scripting seems far more useful now, or &#8220;ExtendScript&#8221; as they call it, we still suffer from the sandbox and the inability to shell out to data sources and do work with them then get right back to automating InDesign. Using Java one can do such things with InDesign Server, but the Server-only nature of the Java makes debugging difficult. Its strongly-typed nature is a big headache, as with C# or any strongly typed language: you spend more time figuring out what type object you&#8217;re working with than you do manipulating the object.</p>
<p>I want to translate the VBA example to JavaScript with some database such as MySQL. In general the power of InDesign to do data-generated publishing is awesome.</p>
<p>Yes, JavaScript is better. VB is actually buggy&#8230; How come this JS works:<br />
<code><br />
var myDocument = app.documents.item(0);<br />
var myRectangle = myDocument.rectangles.item(0);<br />
myHyperlinkURL = myDocument.hyperlinkURLDestinations.add("http://www.publishingsilicon.com");<br />
myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myRectangle);<br />
myHyperlink=myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL);<br />
myHyperlink.visible=false;<br />
</code><br />
and this equivalent in VB doesn&#8217;t:<br />
<code><br />
Dim oInDesign As InDesign.Application<br />
Dim oDocument As InDesign.Document<br />
Dim oPage As InDesign.Page<br />
Dim oImageRect As InDesign.Rectangle<br />
Dim oHyperlinkURL As InDesign.HyperlinkURLDestination<br />
Dim oHyperlinkSource As InDesign.HyperlinkPageItemSource<br />
Dim oHyperlink As InDesign.Hyperlink<br />
Set oInDesign = CreateObject("InDesign.Application.CS4")<br />
Set oDocument = oInDesign.ActiveDocument<br />
Set oImageRect = oDocument.Rectangles.Item(1)<br />
Set oHyperlinkURL = oDocument.HyperlinkURLDestinations.Add("http://www.publishingsilicon.com")<br />
Set oHyperlinkSource = oDocument.HyperlinkPageItemSources.Add(oImageRect)<br />
Set oHyperlink = oDocument.Hyperlinks.Add(oHyperlinkSource, oHyperlinkURL)<br />
oHyperlink.Visible = False<br />
</code><br />
?</p>
<p>The VBA version bombs on the line with oDocument.HyperlinkPageItemSources.Add&#8230; and this sort of thing was <a href="http://forums.adobe.com/message/1111958#1111958">posted to the forums</a> over a year ago. I guess yet another reason the cross-platform JavaScript form of InDesign scripting is better is that it enjoys support. Can hardly blame Adobe for limiting support, especially as they cut 9% of their workforce when holiday season comes along. You can&#8217;t fight every battle.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.publishingsilicon.com%2F2009%2F11%2Findesign-scripting-with-vba-example%2F&amp;linkname=InDesign%20Scripting%20with%20VBA%20Example"><img src="http://www.publishingsilicon.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.publishingsilicon.com/2009/11/indesign-scripting-with-vba-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripting Hyperlinks in InDesign</title>
		<link>http://www.publishingsilicon.com/2009/11/scripting-hyperlinks-in-indesign/</link>
		<comments>http://www.publishingsilicon.com/2009/11/scripting-hyperlinks-in-indesign/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 10:08:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[InDesign]]></category>
		<category><![CDATA[Hyperlinks]]></category>

		<guid isPermaLink="false">http://www.publishingsilicon.com/?p=29</guid>
		<description><![CDATA[A simple example of scripting external hyperlinks.]]></description>
			<content:encoded><![CDATA[<p>I was asked how to script hyperlinks in InDesign, based on someone who dug up <a href="http://www.siliconpublishing.com/InDesign/CatalogExample.htm">this old article</a> that I wrote many years back, when I still used VBA for InDesign. Well, nowadays I only use JavaScript when scripting, but hopefully this basic example will help:<br />
<code><br />
var myDocument = app.documents.item(0);<br />
with(myDocument.pages.item(0)){<br />
//Get a reference to the text frame.<br />
var myTextFrame = textFrames.item(0);<br />
var myParagraph = myTextFrame.paragraphs.item(0);<br />
myHyperlinkURL = myDocument.hyperlinkURLDestinations.add("http://www.publishingsilicon.com");<br />
myHyperlinkSource = myDocument.hyperlinkTextSources.add(myParagraph);<br />
myHyperlink = myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL);<br />
myHyperlink.visible=false;<br />
}</code></p>
<p>This assumes a text frame exists with some text in it, and that when you export the PDF you either check Include\hyperlinks in the PDF Export dialogue, or do the equivalent with code if exporting programmatically.</p>
<p>I need to get around to updating that data-generated example some day. Amazing how many people around the world seem to stumble upon it.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.publishingsilicon.com%2F2009%2F11%2Fscripting-hyperlinks-in-indesign%2F&amp;linkname=Scripting%20Hyperlinks%20in%20InDesign"><img src="http://www.publishingsilicon.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.publishingsilicon.com/2009/11/scripting-hyperlinks-in-indesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
