<?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>The PDF Developer Junkie Blog</title>
	<atom:link href="http://blogs.adobe.com/pdfdevjunkie/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.adobe.com/pdfdevjunkie</link>
	<description>Tips, tricks, examples and news</description>
	<lastBuildDate>Fri, 30 Mar 2012 18:49:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>QR Code Generator for Acrobat</title>
		<link>http://blogs.adobe.com/pdfdevjunkie/2011/11/qr-code-generator-for-acrobat.html</link>
		<comments>http://blogs.adobe.com/pdfdevjunkie/2011/11/qr-code-generator-for-acrobat.html#comments</comments>
		<pubDate>Tue, 01 Nov 2011 19:29:44 +0000</pubDate>
		<dc:creator>Joel Geraci</dc:creator>
				<category><![CDATA[Rich Media Annotations]]></category>
		<category><![CDATA[Version 9]]></category>
		<category><![CDATA[Version X]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pdfdevjunkie/?p=768</guid>
		<description><![CDATA[A few customers have asked me recently if they can add a QR Code to a PDF file for each link they have on the page. We all know that PDF files can have links to external material. But, PDF files often get printed&#8230; and the last time I checked, you can click on a [...]]]></description>
			<content:encoded><![CDATA[<p>A few customers have asked me recently if they can add a QR Code to a PDF file for each link they have on the page. We all know that PDF files can have links to external material. But, PDF files often get printed&#8230; and the last time I checked, you can click on a piece of paper all day long and it won&#8217;t execute a hyperlink. However, a piece of paper can display a bar code and most smart phones can read a QR code.<span id="more-768"></span>Let me show you this QR Code generator.</p>
<p><img src="http://blogs.adobe.com/pdfdevjunkie/files/2011/11/QRPage.jpg" alt="QRPage" border="0" width="200" style="float:right" /><strong>Introducing the QR Code Generator for Acrobat:</strong><br />
The QR Code Generator for Acrobat is a .SWF file that you can add to any PDF page that will create a QR code from any string that you enter into the input field but links are particularly useful. The recipients of your PDF file will need to be using Reader 9 or higher to ensure the QR code appears on the printed page.</p>
<p>To add a QR Code link to your PDF file follow these steps.
<ol>
<li><a href="https://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/download/AcrobatQRCodeCreator.swf">Download the QR Code Generator for Acrobat</a>. You only need to do this once.</li>
<li>Choose Tools &gt; Content &gt; Multimedia and select the SWF tool <img src="http://help.adobe.com/en_US/acrobat/pro/using/images/AX_MM_swf_Med_N.png" /></li>
<li>Drag or double-click to select the area on the page where you want the bar code to appear. The &#8220;Insert SWF&#8221; dialog box opens.</li>
<li>Click Browse to find the &#8220;AcrobatQRCodeCreator.swf&#8221; file that you just downloaded, and then click Open.</li>
<li>Use the advanced options on the &#8220;Insert SWF&#8221; dialog box to change the &#8220;Enable When:&#8221; to &#8220;The page containing the content is visible&#8221;, and then click OK.</li>
<li>Click on the QR Code widget to activate it.</li>
<li>Enter the fully qualified URL for the link you want the QR code to send the user to.</li>
<li>Save the file</li>
</ol>
<p><strong>A few additional notes:</strong></p>
<p>Double-Click on the QR code twice to modify a QR code that has already been placed on the page.</p>
<p>Because the QR code string is stored in the SWF widget, you can have as many of these widgets in your PDF file as you like.</p>
<p>If a recipient of the document is using an earlier version of Reader or a non-Adobe tool to view your PDF file, the QR code will not appear on the page and won&#8217;t print.</p>
<p>At this time there is no API for the QR Code Generator for Acrobat so you won&#8217;t be able to automate the insertion of the link text or use it for forms workflows.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pdfdevjunkie/2011/11/qr-code-generator-for-acrobat.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>New Feature added to Joel’s PDF Portfolio Utilities: Version 1.7</title>
		<link>http://blogs.adobe.com/pdfdevjunkie/2011/10/new-feature-added-to-joel%e2%80%99s-pdf-portfolio-utilities-version-1-7.html</link>
		<comments>http://blogs.adobe.com/pdfdevjunkie/2011/10/new-feature-added-to-joel%e2%80%99s-pdf-portfolio-utilities-version-1-7.html#comments</comments>
		<pubDate>Mon, 31 Oct 2011 18:28:12 +0000</pubDate>
		<dc:creator>Joel Geraci</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PDF Portfolios]]></category>
		<category><![CDATA[Version X]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pdfdevjunkie/?p=751</guid>
		<description><![CDATA[For those of you interested in scripting PDF Portfolios with the new Acrobat JavaScript &#8220;Collection&#8221; Object, I&#8217;ve created a few example utility scripts to demonstrate the features of the new object. There are now five basic utility scripts bundled into the one, each one demonstrates a different aspect of working with PDF Portfolios or what [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you interested in scripting <a href="http://www.adobe.com/products/acrobatpro/online-eportfolios-multimedia-presentations.html">PDF Portfolios</a> with the new Acrobat JavaScript &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.281.html">Collection</a>&#8221; Object, I&#8217;ve created a few example utility scripts to demonstrate the features of the new object.</p>
<p>There are now five basic utility scripts bundled into the one, each one demonstrates a different aspect of working with PDF Portfolios or what the API calls &#8220;Collections&#8221;. To keep things simple, I&#8217;ve copied my earlier posts about my Portfolio Utilities to this page. The new feature that allows you to change the initial view of a Portfolio is at the bottom of the post.<span id="more-751"></span>
<p><strong>Combine All Open PDF Portfolios:</strong><br />
This script will look at all of the open PDF files to see which are PDF Portfolios meaning the <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.381.html">collection</a> object returns a value. Then, it will combine all the open PDF Portfolios into a single new PDF Portfolio that contains all the files and metadata from the sources. This version will not maintain folder structure so it&#8217;s best to use on PDF Portfolios that do not contain folders. Creating a new PDF Portfolio through <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.157.html">app.newCollection()</a> is a privileged function so you&#8217;ll need to wrap it in a <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.167.html">trustedFunction</a> to make it work, the code snippet below shows how.</p>
<p><strong>Note:</strong> <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.167.html">trustedFunction</a> is available only during batch, console and in folder level JavaScripts. Because it is used to elevate the privilege level of the function, you can&#8217;t use it from inside a PDF file.</p>
<pre>trustedNewCollection = app.trustedFunction (
	function()
	{
		app.beginPriv(); // Explicitly raise the privilege
		var d = app.newCollection();
		app.endPriv();
		return d;
	}
)</pre>
<p><strong>Copy PDF Document Properties to Portfolio Fields:</strong><br />
This script will run through all of the <a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.323.html">Data Objects</a> in the collection and,<br />
for every PDF that it finds, will use the new &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.334.html#2206831">setFieldValue</a>&#8221; method to copy each item in the &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.396.html">doc.info</a>&#8221; dictionary to a collection metadata field, creating new fields as necessary.</p>
<p><strong>Export Portfolio Metadata to Console:</strong><br />
This script will run through each item in the collection and use the &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.333.html">getFieldValue</a>&#8221; method to create a comma separated values stream from the collection metadata. The script will output to the JavaScript console, you can copy the text from there and massage the data in another application if you need to.</p>
<p><strong>Total Number of Pages:</strong><br />
This script will run through each item in the collection and use the &#8220;<a title="numPages" href="http://livedocs.adobe.com/acrobat_sdk/10/Acrobat10_HTMLHelp/JS_API_AcroJS.88.403.html" target="_blank">numPages</a>&#8221; method to detect the number of pages in any PDF attachments in the Portfolio then display the total number of pages in PDF files in the Portfolio.</p>
<p><a name="setDetails"><strong><span style="color: #ff0000">NEW: </span></a>Set Initial View to Details:</strong><br />
This script will set the Portfolio&#8217;s initial view to &#8220;Details&#8221; and create a splitter bar so that the first file in the Portfolio is showing. This will make the Portfolio look more like the “List with File Preview” layout from Acrobat 9.</p>
<p align="center"><img src="http://blogs.adobe.com/pdfdevjunkie/files/2011/10/details.jpg" alt="Details" border="0" width="400" /><br />Portfolio with initial view set to &#8220;Details&#8221;.</p>
<p><H2><strong>Windows Installation:</strong></h2>
<p>1. From Windows, select &#8220;Start&#8221; then &#8220;Run&#8221;. Depending on your version,  paste one of the following lines into the text box and press enter</p>
<blockquote><p><strong>Version 9:</strong><br />%USERPROFILE%\Application Data\Adobe\Acrobat\9.0\JavaScripts</p>
<p><strong>Version 10-10.1.0:</strong><br />%USERPROFILE%\Application Data\Adobe\Acrobat\10.0\JavaScripts</p>
<p><strong>Version 10.1.1 and higher:</strong><br />%USERPROFILE%\Application Data\Adobe\Acrobat\Privileged\10.0\JavaScripts</p>
<p>For a fuller explanation as to the change between 10.1.0 and 10.1.1 please see my other article <a href="http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html">JavaScript Changes for Acrobat X and Reader X, version 10.1.1 </a></p>
</blockquote>
<p>2. Drag the .js file to that directory</p>
<p>3. Restart Acrobat if it&#8217;s running.</p>
<p><strong>Mac Installation:</strong></p>
<p>1. Find your version of the directory below. The <strong><span style="color: #ff0000">red</span></strong> parts of the path will change based on your system, choose the right path for your version.</p>
<blockquote><p>/<strong><span style="color: #ff0000">Macintosh HD</span></strong>/Users/<strong><span style="color: #ff0000">user</span></strong>/Library/Application Support/Adobe/Acrobat/<span style="color: #000000">9.0_x86</span>/JavaScripts/</p>
<p>/<span style="color: #ff0000"><strong>Macintosh HD</strong></span>/Users/<span style="color: #ff0000"><strong>user</strong></span>/Library/Application Support/Adobe/Acrobat/10.0_x86/JavaScripts/</p></blockquote>
<p>2. Drag the .js file to that directory</p>
<p>3. Restart Acrobat if it&#8217;s running.</p>
<p>You&#8217;ll see a new menu under &#8220;Edit&#8221; called &#8220;Joel&#8217;s Portfolio Utilities&#8221;</p>
<p><a href="https://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/download/ADBE_JFG_PortfolioUtilities_v1.7.js">Download Joel&#8217;s Portfolio Utilities</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pdfdevjunkie/2011/10/new-feature-added-to-joel%e2%80%99s-pdf-portfolio-utilities-version-1-7.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Added Tracking Information to &#8220;The Web Designer’s Guide to Acrobat&#8221;</title>
		<link>http://blogs.adobe.com/pdfdevjunkie/2011/10/added-tracking-information-to-the-web-designer%e2%80%99s-guide-to-acrobat.html</link>
		<comments>http://blogs.adobe.com/pdfdevjunkie/2011/10/added-tracking-information-to-the-web-designer%e2%80%99s-guide-to-acrobat.html#comments</comments>
		<pubDate>Wed, 12 Oct 2011 20:59:52 +0000</pubDate>
		<dc:creator>Joel Geraci</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pdfdevjunkie/?p=745</guid>
		<description><![CDATA[I just updated the The Web Designer’s Guide to Acrobat with new information about tracking PDF downloads. The two platforms that I discuss are the Adobe Online Marketing Suite and Google Analytics. If anyone is using anything else, please let me know via the comments and I&#8217;ll do some research and add the information. Jump [...]]]></description>
			<content:encoded><![CDATA[<p>I just updated the <a href="http://blogs.adobe.com/pdfdevjunkie/web_designers_guide">The Web Designer’s Guide to Acrobat</a> with new information about tracking PDF downloads. The two platforms that I discuss are the Adobe Online Marketing Suite and Google Analytics. If anyone is using anything else, please let me know via the comments and I&#8217;ll do some research and add the information. </p>
<p>Jump to the <a href="http://blogs.adobe.com/pdfdevjunkie/web_designers_guide#tracking">Tracking section of The Web Designer’s Guide to Acrobat</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pdfdevjunkie/2011/10/added-tracking-information-to-the-web-designer%e2%80%99s-guide-to-acrobat.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Changes for Acrobat X and Reader X, version 10.1.1</title>
		<link>http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html</link>
		<comments>http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html#comments</comments>
		<pubDate>Tue, 27 Sep 2011 04:21:16 +0000</pubDate>
		<dc:creator>Joel Geraci</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pdfdevjunkie/?p=731</guid>
		<description><![CDATA[Background Due to Adobe’s high interest in security, changes to existing Acrobat and Adobe Reader functionality are periodically released to further strengthen the product’s resistance to malicious attacks. As part of this effort, 10.1.1 introduces changes to the JavaScript feature that stores global variables and executes user-defined scripts. Prior to 10.1.1, end users could place [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Background</strong></p>
<p>Due to Adobe’s high interest in security, changes to existing Acrobat and Adobe Reader functionality are periodically released to further strengthen the product’s resistance to malicious attacks. As part of this effort, 10.1.1 introduces changes to the JavaScript feature that stores global variables and executes user-defined scripts.</p>
<p>Prior to 10.1.1, end users could place JavaScript files in %ApplicationData%\Adobe\(product name)\(version)\JavaScripts, and these files would execute automatically on application startup. For example, IT might place a JS file for modifying the product user interface by hiding or adding menu items on an Windows XP machine in C:\Documents and Settings\(username)\Application Data\Adobe\Acrobat\10.0\JavaScripts. Additionally, the folder contains glob.js and glob.settings.js, two files which the product can read and write to when storing global variables.</p>
<p><strong>Changes for 10.1.1</strong></p>
<p>By design, Acrobat processes do not write to the %ApplicationData%\ Acrobat\Privileged\10.0 folder. Additionally, sandboxed processes are specifically prohibited from writing to that folder. Thus, the most secure operation involves enabling Protected View in Acrobat and Protected Mode in Reader and thereby sandboxing all processes.</p>
<p>Additionally, the user JavaScript folder is moved from</p>
<ul>
<li><strong>Vista and Windows 7:</strong><br />Users\(username)\AppData\Roaming\Adobe\Acrobat\10.0\JavaScripts<br /> to <br />Users\(username)\AppData\Roaming\Adobe\Acrobat\Privileged\10.0\JavaScripts.<br />For example, the new path might be<br /> C:\Users\JoeUser\AppData\Roaming\Adobe\Acrobat\Privileged\10.0\JavaScripts</li>
<li><strong>XP:</strong><br />Documents and Settings\(username)\Application Data\Adobe\Acrobat\10.0\JavaScripts to Documents and Settings\(username)\Application Data\Adobe\Acrobat\Privileged\10.0\JavaScripts. For example, the new path might be: C:\Documents and Settings\JoeUser\Application Data\Adobe\Acrobat\Privileged\10.0\JavaScripts</li>
</ul>
<p><a href="http://kb2.adobe.com/cps/915/cpsid_91534.html">Read the full Knowledge Base Article for details and recommendations</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check Out Our Newest MAX Session!</title>
		<link>http://blogs.adobe.com/pdfdevjunkie/2011/09/check-out-our-newest-max-session.html</link>
		<comments>http://blogs.adobe.com/pdfdevjunkie/2011/09/check-out-our-newest-max-session.html#comments</comments>
		<pubDate>Tue, 06 Sep 2011 20:10:01 +0000</pubDate>
		<dc:creator>Joel Geraci</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pdfdevjunkie/?p=728</guid>
		<description><![CDATA[Attention MAX fans! Be sure to check the newest speaking session addition, “Accelerate Business Results with Adobe Document Exchange Services,” an in-depth look at how some of our newest features can provide cloud-based solutions that save you time and effort. We’ll be diving into customer case studies, demonstrations, examples, and explanations of Acrobat cloud service [...]]]></description>
			<content:encoded><![CDATA[<p>Attention MAX fans! Be sure to check the newest speaking session addition, “<a href="http://adobe.ly/MAX11reg">Accelerate Business Results with Adobe Document Exchange Services</a>,” an in-depth look at how some of our newest features can provide cloud-based solutions that save you time and effort.  We’ll be diving into customer case studies, demonstrations, examples, and explanations of Acrobat cloud service products, including:</p>
<ul>
<li>AdobeEchoSign – Securely sign, send, track, and store contracts online<br />
Adobe FormsCentral – Easily create, distribute, collect, and analyze online forms and surveys</li>
<li>Adobe SendNow – Instantly send and manage digital documents without the hassle of overnight delivery services and FTP sites</li>
<li>Adobe CreatePDF and ExportPDF – Create PDF documents online and convert PDF files to Word</li>
<li>Acrobat.com – Improve team collaboration with web conferencing and shared workspaces</li>
</ul>
<p>So join William Lau, senior product marketing manager, and Mangesh Bhandarkar, principal product manager, of the <a href="http://blogs.adobe.com/acrobat/2011/08/meet-the-adobe-max-speakers.html">Acrobat Solutions team</a> on Tuesday, Oct. 4th at 2:45PM in room S2600!  You can <a href="http://adobe.ly/MAX11reg">register here</a>.</p>
<p>If you’re attending AdobeMAX, don’t miss this great opportunity to learn how your business can run smoothly and save you money using our unique business solutions.  See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pdfdevjunkie/2011/09/check-out-our-newest-max-session.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Web Designer’s Guide to Acrobat updated</title>
		<link>http://blogs.adobe.com/pdfdevjunkie/2011/08/the-web-designer%e2%80%99s-guide-to-acrobat-updated.html</link>
		<comments>http://blogs.adobe.com/pdfdevjunkie/2011/08/the-web-designer%e2%80%99s-guide-to-acrobat-updated.html#comments</comments>
		<pubDate>Fri, 26 Aug 2011 21:51:30 +0000</pubDate>
		<dc:creator>Joel Geraci</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Version X]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pdfdevjunkie/?p=616</guid>
		<description><![CDATA[I just updated the The Web Designer’s Guide to Acrobat with new information about detecting if the Reader or Acrobat plugin is installed. Withthe recent changes in Lion, plugin detection is more important than ever to ensure a good user experience. I also updated the section on embedding PDF in the browser. Jump to The [...]]]></description>
			<content:encoded><![CDATA[<p>I just updated the <a href="http://blogs.adobe.com/pdfdevjunkie/web_designers_guide">The Web Designer’s Guide to Acrobat</a> with new information about detecting if the Reader or Acrobat plugin is installed. Withthe recent changes in Lion, plugin detection is more important than ever to ensure a good user experience. I also updated the section on embedding PDF in the browser.</p>
<p>Jump to <a href="http://blogs.adobe.com/pdfdevjunkie/web_designers_guide">The Web Designer’s Guide to Acrobat</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pdfdevjunkie/2011/08/the-web-designer%e2%80%99s-guide-to-acrobat-updated.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Feature in Joel&#8217;s PDF Portfolio Utilities</title>
		<link>http://blogs.adobe.com/pdfdevjunkie/2011/08/new-feature-in-joels-pdf-portfolio-utilities.html</link>
		<comments>http://blogs.adobe.com/pdfdevjunkie/2011/08/new-feature-in-joels-pdf-portfolio-utilities.html#comments</comments>
		<pubDate>Tue, 23 Aug 2011 22:26:03 +0000</pubDate>
		<dc:creator>Joel Geraci</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pdfdevjunkie/?p=555</guid>
		<description><![CDATA[For those of you interested in scripting PDF Portfolios with the new Acrobat JavaScript &#8220;Collection&#8221; Object, I&#8217;ve created a few example utility scripts to demonstrate the features of the new object. There are now four basic utility scripts bundled into the one, each one demonstrates a different aspect of working with PDF Portfolios or what [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you interested in scripting <a href="http://www.adobe.com/products/acrobatpro/online-eportfolios-multimedia-presentations.html">PDF Portfolios</a> with the new Acrobat JavaScript &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.281.html">Collection</a>&#8221; Object, I&#8217;ve created a few example utility scripts to demonstrate the features of the new object.</p>
<p>There are now four basic utility scripts bundled into the one, each one demonstrates a different aspect of working with PDF Portfolios or what the API calls &#8220;Collections&#8221;. To keep things simple, I&#8217;ve copied my earlier posts about my Portfolio Utilities to this page. If you are just interested in the new feature you can <a href="http://blogs.adobe.com/pdfdevjunkie/2011/08/new-feature-in-joels-pdf-portfolio-utilities.html#numPages">jump right to it.</a><span id="more-555"></span>
<p><strong>Combine All Open PDF Portfolios:</strong></p>
<p>This script will look at all of the open PDF files to see which are PDF Portfolios meaning the <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.381.html">collection</a> object returns a value. Then, it will combine all the open PDF Portfolios into a single new PDF Portfolio that contains all the files and metadata from the sources. This version will not maintain folder structure so it&#8217;s best to use on PDF Portfolios that do not contain folders. Creating a new PDF Portfolio through <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.157.html">app.newCollection()</a> is a privileged function so you&#8217;ll need to wrap it in a <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.167.html">trustedFunction</a> to make it work, the code snippet below shows how.</p>
<p><strong>Note:</strong> <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.167.html">trustedFunction</a> is available only during batch, console and in folder level JavaScripts. Because it is used to elevate the privilege level of the function, you can&#8217;t use it from inside a PDF file.</p>
<pre>trustedNewCollection = app.trustedFunction (
	function()
	{
		app.beginPriv(); // Explicitly raise the privilege
		var d = app.newCollection();
		app.endPriv();
		return d;
	}
)</pre>
<p><strong>Copy PDF Document Properties to Portfolio Fields:</strong></p>
<p>This script will run through all of the <a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.323.html">Data Objects</a> in the collection and,<br />
for every PDF that it finds, will use the new &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.334.html#2206831">setFieldValue</a>&#8221; method to copy each item in the &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.396.html">doc.info</a>&#8221; dictionary to a collection metadata field, creating new fields as necessary.</p>
<p><strong>Export Portfolio Metadata to Console:</strong></p>
<p>This script will run through each item in the collection and use the &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.333.html">getFieldValue</a>&#8221; method to create a comma separated values stream from the collection metadata. The script will output to the JavaScript console, you can copy the text from there and massage the data in another application if you need to.</p>
<p><a name="numPages"></a><strong>Total Number of Pages:</strong></p>
<p><strong></strong>This script will run through each item in the collection and use the &#8220;<a title="numPages" href="http://livedocs.adobe.com/acrobat_sdk/10/Acrobat10_HTMLHelp/JS_API_AcroJS.88.403.html" target="_blank">numPages</a>&#8221; method to detect the number of pages in any PDF attachments in the Portfolio then display the total number of pages in PDF files in the Portfolio.</p>
<p><strong>Windows Installation:<br />
</strong></p>
<p>1. From Windows, select &#8220;Start&#8221; then &#8220;Run&#8221;. Depending on your version,  paste the following line into the text box and press enter</p>
<blockquote><p>%USERPROFILE%\Application Data\Adobe\Acrobat\9.0\JavaScripts</p>
<p>%USERPROFILE%\Application Data\Adobe\Acrobat\10.0\JavaScripts</p></blockquote>
<p>2. Drag the .js file to that directory</p>
<p>3. Restart Acrobat if it&#8217;s running.</p>
<p><strong>Mac Installation:</strong></p>
<p>1. Find your version of the directory below. The <strong><span style="color: #ff0000">red</span></strong> parts of the path will change based on your system, choose the right path for your version.</p>
<blockquote><p>/<strong><span style="color: #ff0000">Macintosh HD</span></strong>/Users/<strong><span style="color: #ff0000">joelgeraci</span></strong>/Library/Application Support/Adobe/Acrobat/<span style="color: #000000">9.0_x86</span>/JavaScripts/</p>
<p>/<span style="color: #ff0000"><strong>Macintosh HD</strong></span>/Users/<span style="color: #ff0000"><strong>joelgeraci</strong></span>/Library/Application Support/Adobe/Acrobat/10.0_x86/JavaScripts/</p></blockquote>
<p>2. Drag the .js file to that directory</p>
<p>3. Restart Acrobat if it&#8217;s running.</p>
<p>You&#8217;ll see a new menu under &#8220;Edit&#8221; called &#8220;Joel&#8217;s Portfolio Utilities&#8221;</p>
<p><a href="https://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/download/ADBE_JFG_PortfolioUtilities_v1.6.js">Download Joel&#8217;s Portfolio Utilities</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pdfdevjunkie/2011/08/new-feature-in-joels-pdf-portfolio-utilities.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the &#8220;Video Player Plus&#8221; with the &#8220;Insert VPP JavaScript&#8221; Action</title>
		<link>http://blogs.adobe.com/pdfdevjunkie/2011/06/using-the-video-player-plus-with-the-insert-vpp-javascript-action.html</link>
		<comments>http://blogs.adobe.com/pdfdevjunkie/2011/06/using-the-video-player-plus-with-the-insert-vpp-javascript-action.html#comments</comments>
		<pubDate>Tue, 28 Jun 2011 22:36:35 +0000</pubDate>
		<dc:creator>Joel Geraci</dc:creator>
				<category><![CDATA[Rich Media Annotations]]></category>
		<category><![CDATA[Version X]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pdfdevjunkie/?p=541</guid>
		<description><![CDATA[This article is part two of &#8220;Actions in Action at Adobe&#8221;. Please read through the first article and familiarize yourself with and install the Video Player Plus before continuing. Note: Instruction in this post require Adobe Acrobat X Pro Overview: The new Actions Wizard in Adobe Acrobat X can be leveraged to automate repetitive tasks. [...]]]></description>
			<content:encoded><![CDATA[<p>This article is part two of <a href="http://blogs.adobe.com/pdfdevjunkie/2011/06/actions-in-action-at-adobe.html">&#8220;Actions in Action at Adobe&#8221;</a>. Please read through the first article and familiarize yourself with and install the <a href="http://blogs.adobe.com/pdfdevjunkie/2010/03/introducing_the_video_player_p.html">Video Player Plus</a> before continuing.</p>
<p><strong>Note: </strong>Instruction in this post require Adobe Acrobat X Pro </p>
<h2>Overview:</h2>
<p>The new Actions Wizard in Adobe Acrobat X can be leveraged to automate repetitive tasks. One such task is the ability to add document level JavaScript and set actions on objects in a PDF document. Because object level JavaScript can only be attached to specific objects, buttons and layers, in this use case, strict naming conventions must be adhered to when authoring documents using InDesign.</p>
<p><span id="more-541"></span>
<p><strong>Setup:</strong><br />
After setting up the Video Player Plus, download and open the <a href="https://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/download/Insert_VPP_JavaScripts.sequ">Insert_VPP_JavaScripts.sequ</a> action file and allow Acrobat to add it to the list of Actions. This file contains the Action that will appear in the Actions Wizard panel in Acrobat X Pro.</p>
<h2>Authoring Guidelines for InDesign:</h2>
<p><strong>Layer Naming:</strong><br />
 When exporting to PDF, only top level InDesign layers are converted to PDF layers. In order for the inserted JavaScript to function properly the following naming conventions must be used.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="115" valign="top">
<p>warning</p>
</td>
<td valign="top">
<p>The &lsquo;&lsquo;warning&rsquo;&rsquo; layer contains a single graphic that warns the user that they are not viewing the PDF file in a supported tool. Adobe viewers are able to hide this layer through JavaScript that runs when the document is opened. Third party tools typically will not be capable of hiding this layer. This graphic should be on the first page and in the upper ½ of the layout. It may, in other forms, be used throughout the document but is not required.</p>
</td>
</tr>
<tr>
<td width="115" valign="top">
<p>interactive</p>
</td>
<td valign="top">
<p>Document elements which should appear in the PDF file only when opened in Reader version 9 or higher</p>
</td>
</tr>
<tr>
<td width="115" valign="top">
<p>non-Interactive</p>
</td>
<td valign="top">
<p>Document elements which should appear in the PDF file only when opened in a version of Reader lower than version 9</p>
</td>
</tr>
<tr>
<td width="115" valign="top">
<p>playMessage</p>
</td>
<td valign="top">
<p>The only object on this layer should be a message that will appear when a user rolls over the &lsquo;&lsquo;playMovie&rsquo;&rsquo; button in the PDF file</p>
</td>
</tr>
<tr>
<td width="115" valign="top">
<p>playMessageHD</p>
</td>
<td valign="top">
<p>The only object on this layer should be a message that will appear when a user rolls over the &lsquo;&lsquo;playMovieHD&rsquo;&rsquo; button in the PDF file</p>
</td>
</tr>
<tr>
<td width="115" valign="top">
<p>playMessageMask</p>
</td>
<td valign="top">
<p>The only object on this layer should be a white box that masks the &lsquo;&lsquo;playMessage&rsquo;&rsquo; and &lsquo;&lsquo;playMessageHD&rsquo;&rsquo; layers. Because most 3rd party viewers display all layers all the time, the &lsquo;&lsquo;playMessage&rsquo;&rsquo; and<br />
  &lsquo;&lsquo;playMessageHD&rsquo;&rsquo; will always show and the overlapping text can be distracting. This layer compensates for that condition. This layer must be on top of the &lsquo;&lsquo;playMessage&rsquo;&rsquo; and &lsquo;&lsquo;playMessageHD&rsquo;&rsquo; layers.</p>
</td>
</tr>
<tr>
<td width="115" valign="top">
<p>static</p>
</td>
<td valign="top">
<p>Optional: All document elements that should appear regardless of viewer version should be on this layer. This layer name is ignored by the scripts and is provided only for clarity. You are not require to use the name &lsquo;&lsquo;static&rsquo;&rsquo; or only add these types of elements to a single layer but it is good convention for future editing.</p>
</td>
</tr>
</table>
<p><strong>Note:</strong> Hidden layers in InDesign are hidden by default when exported to PDF and viewed in Adobe viewers. Some 3rd party viewers, inaccurately, do not hide these layers. You should consider this when creating your InDesign file. Do not rely on hidden layers to hide objects that you no not wish to be seen, remove them instead.</p>
<p><strong>IMPORTANT: </strong>Be sure all layers are set to be visible before exporting.</p>
<p><strong>Button Naming:</strong><br />
 There are two important buttons that the JavaScript in the Insert_VPP_JavaScripts will modify. In order for the JavaScript to function properly the following naming conventions must be used.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="115" valign="top">
<p>playMovie</p>
</td>
<td valign="top">
<p>This button triggers the embedded movie to play. Only the &lsquo;&lsquo;Normal&rsquo;&rsquo; and &lsquo;&lsquo;Rollover&rsquo;&rsquo; stated need to be defined. No actions need to be defined using InDesign for this button. The Insert_VPP_JavaScripts Action will add the appropriate actions.</p>
</td>
</tr>
<tr>
<td width="115" valign="top">
<p>playMovieHD</p>
</td>
<td valign="top">
<p>This button triggers the streaming movie to play. Only the &lsquo;&lsquo;Normal&rsquo;&rsquo; and &lsquo;&lsquo;Rollover&rsquo;&rsquo; stated need to be defined. No actions need to be defined using InDesign for this button. The Insert_VPP_JavaScripts Action will add the appropriate actions. When the action is run, you will be asked to supply the URL to the streaming movie. This is not the embed code. The URL must point to a video file and the name must end in either .FLV or .F4V.</p>
</td>
</tr>
</table>
<p><strong>Authoring the Embedded Video:</strong><br />
The embedded video needs to have a poster image derived from the video itself, preferably near the start of the video but good design trumps this guideline. Choose an image that works for the rest of the page. There should be only one embedded video per document. Additional videos can be added as links to Adobe TV or other hosted libraries.</p>
<p>Use the controller &lsquo;&lsquo;SkinOverAllNoVolNoCaptionNoFull&rsquo;&rsquo; Check &lsquo;&lsquo;Show Controller on Rollover&rsquo;&rsquo;<br />
 Navigation Points are not required.</p>
<p>Creating your Interactive PDF file.</p>
<ol>
<li>Export the InDesign file to PDF using the settings in the image below.</li>
<li>Upon completion, the file will open in Acrobat</li>
<li>Select File -&gt; Action Wizard -&gt; Insert_VPP_JavaScripts</li>
<li>You will be asked to supply the URL to the streaming movie. This is not the embed code. The URL must point to a video file and the name must end in either .FLV or .F4V.</li>
<li>When the action completes, save the file. Note: even though the save button is dimmed, you need to save the file; part of the JavaScript that runs resets the save flag on the file so that users are not prompted to save the file when button states are changed.
</li>
<li>Test the file.</li>
</ol>
<p>You can try this out using the resources below.</p>
<p><a href="https://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/download/MeridienFolder.zip">Meridien InDesign Template</a> &#8211; You&#8217;ll get a few linking errors when you open it up, ignore them. The file is completely functional. The file contains a low resolution embedded video.</p>
<p>Example link to Streaming Video &#8211; You can stream this example video from the Adobe TV server. Use this URL in step 4 above. Copy the text, don&#8217;t go to the link.</p>
<p>http://content.tv.adobe.com/adobetv2/videos/2011-05-28/5ce053ac-45f0-dea3-284e-e59510d97a83.mp4</p>
<p><a href="https://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/download/Meridien.pdf">Completed Meridien PDF file</a>: Your final file should work like this one.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pdfdevjunkie/2011/06/using-the-video-player-plus-with-the-insert-vpp-javascript-action.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://content.tv.adobe.com/adobetv2/videos/2011-05-28/5ce053ac-45f0-dea3-284e-e59510d97a83.mp4" length="28488527" type="video/mp4" />
<enclosure url="http://content.tv.adobe.com/adobetv2/videos/2011-05-28/5ce053ac-45f0-dea3-284e-e59510d97a83.mp4" length="28488527" type="video/mp4" />
		</item>
		<item>
		<title>Actions in Action at Adobe</title>
		<link>http://blogs.adobe.com/pdfdevjunkie/2011/06/actions-in-action-at-adobe.html</link>
		<comments>http://blogs.adobe.com/pdfdevjunkie/2011/06/actions-in-action-at-adobe.html#comments</comments>
		<pubDate>Fri, 24 Jun 2011 22:06:34 +0000</pubDate>
		<dc:creator>Joel Geraci</dc:creator>
				<category><![CDATA[Actions]]></category>
		<category><![CDATA[Rich Media Annotations]]></category>
		<category><![CDATA[Version X]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pdfdevjunkie/?p=533</guid>
		<description><![CDATA[The new Actions Wizard in Adobe Acrobat X can be leveraged to automate repetitive tasks. One such task is the ability to add document level JavaScript and set actions on objects in a PDF document. Basically, you can write an Action to automate the addition of complex interactivity that would otherwise be tedious and prone [...]]]></description>
			<content:encoded><![CDATA[<p>The new Actions Wizard in Adobe Acrobat X can be leveraged to automate repetitive tasks. One such task is the ability to add document level JavaScript and set actions on objects in a PDF document. Basically, you can write an Action to automate the addition of complex interactivity that would otherwise be tedious and prone to human error. </p>
<p>At Adobe we&#8217;ve actually leveraged this capability to enable one of our partners to create Dynamic PDF files for our customer success stories. Almost all of the work takes place in InDesign where they&#8217;re most comfortable. The final step happens in Acrobat; they simply run an Action that I developed for them. Seconds later, the job is complete.<span id="more-533"></span>The <a href="http://blogs.adobe.com/pdfdevjunkie/2010/03/introducing_the_video_player_p.html" target="_blank">Video Player Plus</a>, which is identical to the standard video player that ships with Acrobat 9 and X except for the few additional functions that I added was also used for this project. You&#8217;ll see why when I go over the design goals for our dynamic customer success story project.</p>
<h2>Background:</h2>
<p><a rel="lightbox" href="http://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/images/harryPage.png"><img align="right" src="http://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/images/harryPage.png" border="1" alt="DefaultLinear.png" width="200" /></a>Many of our customer success stories, which are typically 2-4 page PDF documents, have videos associated with them that reside on Adobe TV and are linked to from the PDF file. This arrangement has worked well but we&#8217;ve been toying with the idea of embedding the videos in the PDF files since we released Acrobat 9. The problem was that PDF files with embedded video can get very large very fast. We did have the ability to stream the video into the document but then the user would need to be online and with a fairly robust connection to be able to experience the file in the way we intended. Finally, we could have used the <a href="http://blogs.adobe.com/pdfdevjunkie/2010/03/introducing_the_video_player_p.html" target="_blank">Video Player Plus</a> which I posted over a year ago, to embed a low resolution version and stream an HD version of the video but using it involved some hand tweaking of far too many settings in the PDF file (using Acrobat) to be practical for the typical InDesign user. Finally, not everyone is using the latest readers and some may not even be using an Adobe viewer to read PDF files. We needed to accommodate these users too.</p>
<h2>Design Goals:</h2>
<p>With all of the above in mind, we came up with the following design goals. These are roughly in order of importance.</p>
<ul>
<li>The PDF file had to be a practical demonstration of how dynamic a PDF document could be. We wanted to show off the technology and inspire our customers.</li>
<li>The PDF file would need to provide a good experience if the user was offline and a <strong>great</strong> experience when the user was online.</li>
<li>The final PDF file had to be small enough to email. Under 10Mb would be acceptable, under 5Mb was the target.</li>
<li>Because these documents go through many revision cycles, the authoring process had to be geared towards the user of InDesign and minimize the amount of post processing in Acrobat. The process had to be easily repeatable by users who have very little experience with the advanced functionality of Acrobat.</li>
<li>Given that the dynamic nature of the file would only work in version 9 or higher, we had to create the file in such a way that users of other PDF tools would be informed that they may not be experiencing the file in the way we intended.</li>
</ul>
<p>Given all these criteria, specifically that 4th bullet, this project would have been impossible without the use of Actions in Acrobat X.</p>
<p>Take a look at these two examples to see what we finally came up with and then continue reading to see how we did it.</p>
<p><a href="http://www.adobe.com/showcase/casestudies/divididyn/casestudy.pdf">DIVIDI Customer Success Story <img src="http://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/images/pdf_file.png" alt="" /></a><br />
<br /><a href="http://www.adobe.com/showcase/casestudies/hasselldyn/casestudy.pdf">Hassell Customer Success Story  <img src="http://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/images/pdf_file.png" alt="" /> </a></p>
<p>Go to the second page of each document. Notice the button roll-overs. Clicking the first play button will play the embedded video, clicking the play HD button will stream in an HD version of the video.</p>
<h2>Engineering the Solution:</h2>
<p>The video player that ships with Acrobat 9 and X can play <em><strong>either</strong></em> an embedded video or a video streaming from the web. For this project we needed a player that could do both. Back in the Acrobat 9 days, I created the <a href="http://blogs.adobe.com/pdfdevjunkie/2010/03/introducing_the_video_player_p.html" target="_blank">Video Player Plus</a> which allows for the same video widget in a PDF file to play any number of embedded videos <em><strong>and</strong></em> any number of videos streamed from the web. After my modifications to the default player, the <a href="http://blogs.adobe.com/pdfdevjunkie/2010/03/introducing_the_video_player_p.html" target="_blank">Video Player Plus</a> has the ability to programmatically change the source of the video playing in the video widget as well as store the original source for reference.</p>
<p>In terms of accommodating users who are using non-Adobe PDF tools, we can actually take advantage of the fact that they typically don&#8217;t have a full JavaScript implementation and don&#8217;t typically handle layers as well as Acrobat. Top level layers created in InDesign export to PDF perfectly with their names and visibility settings in tact. InDesign can also place video files, create &#8220;posters&#8221; for the video and assign player bar properties as well as create buttons complete with roll over states and actions; all of this exports perfectly as well. By creating a  template for the customer success stories in InDesign that uses standardized layer and button naming conventions, we can then use JavaScript in Acrobat to &#8220;activate&#8221; these elements and hide or show them as needed. </p>
<p>So far, only Acrobat and Reader can programmatically hide a layer. To present a &#8220;warning&#8221; to a user that has a non-Adobe viewer, like the Preview application on a Mac, you simply create a layer in InDesign with the warning. You then add JavaScript to the file that lets Acrobat and Reader hide the layer; other software will always display the layer. All that&#8217;s left is to find a good place to put the warning so that the user will still be able to read the content even if the interactivity isn&#8217;t functional.      </p>
<p>Finally, we need a way to make all of this work in a streamlined and repeatable way.</p>
<p>One of the most powerful Acrobat JavaScript features is the ability for it to actually add code to various objects in a PDF file. A JavaScript can add JavaScript at the document level as well as buttons, links and bookmarks. Additionally, one of the steps in an Action is to <strong>Execute JavaScript</strong>. Actions can also be easily shared, simply export the Action, send it to someone else and they simply open the file to install the Action into their copy of Acrobat X. By combining all of these capabilities, I found that I could easily and quite literally transfer the benefits of my JavaScript expertise to someone else who doesn&#8217;t know anything about code. Think about that for a minute.         </p>
<p><strong>Integrating the new video player with InDesign:</strong><br />
InDesign ships with the same exact default video player as Acrobat 9 and X so it can export PDF files that work with Reader and Acrobat. This means that I could simply replace the default InDesign video player with the Video Player Plus and InDesign wouldn&#8217;t know the difference. Since I only added functionality and didn&#8217;t change any existing code in the player, InDesign would continue to be able to use this new player to create proper PDF files.</p>
<p><strong>Managing Objects through JavaScript:</strong><br />
Acrobat JavaScript is extremely powerful but it does have it&#8217;s idiosyncrasies. For example you can get the value of a field directly as long as you know the name of it. The code below will set variable <strong>v</strong> to the value of the field named <strong>myText</strong>.</p>
<p>var v = this.getField(&#8220;myText&#8221;).value     </p>
<p>This is because the value of <strong>myText</strong> is the same no matter what page <strong>myText</strong> is on. <strong>myText</strong> can even be present on multiple pages, each one with the same value. Buttons are also considered fields in Acrobat so you can get access to a button&#8217;s properties as long as you know the name of the button.</p>
<p>With layers, it&#8217;s not so simple. Different pages can have different numbers of layers and these layers can have the same name but be completely unrelated. Nevertheless, if you want to programmatically control the visibility of a layer you need to know it&#8217;s name, just like a field, but you also need to know what page it&#8217;s on.</p>
<p><img align="right" style="border: 1px;border-color: #000;border-style: solid" src="http://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/images/InDesighLayers.png" alt="" />Basically, if you want to be able to programmatically control an object in Acrobat you need to know it&#8217;s name. This discussion is really just a long way of saying that if you want to use an Action to add JavaScript to a PDF file and have it work properly, you need to know the name of every object that you want the script to modify. This means you need to start with a well defined template in InDesign with a predefined set of layer and button names.</p>
<p>Next week, I&#8217;ll be posting the InDesign template, instructions for use and the Action to you can try this out at home.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pdfdevjunkie/2011/06/actions-in-action-at-adobe.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Joel&#8217;s PDF Portfolio Utilities Updated for Acrobat X</title>
		<link>http://blogs.adobe.com/pdfdevjunkie/2011/06/joels_pdf_portfolio_utilities.html</link>
		<comments>http://blogs.adobe.com/pdfdevjunkie/2011/06/joels_pdf_portfolio_utilities.html#comments</comments>
		<pubDate>Mon, 20 Jun 2011 08:15:29 +0000</pubDate>
		<dc:creator>Joel Geraci</dc:creator>
				<category><![CDATA[PDF Portfolios]]></category>
		<category><![CDATA[collection object]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Joel's PDF Portfolio Utilities]]></category>
		<category><![CDATA[PDF Portfolio]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pdfdevjunkiedev/2008/10/joels_pdf_portfolio_utilities.html</guid>
		<description><![CDATA[UPDATE: Now works with Acrobat X For those of you interested in scripting PDF Portfolios with the new Acrobat JavaScript &#8220;Collection&#8221; Object, I&#8217;ve created a few example utility scripts to demonstrate the features of the new object. There are three basic utility scripts bundled into the one, each one demonstrates a different aspect of working [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000"><strong>UPDATE:</strong></span><strong> Now works with Acrobat X</strong></p>
<p>For those of you interested in scripting <a href="http://www.adobe.com/products/acrobatpro/online-eportfolios-multimedia-presentations.html">PDF Portfolios</a> with the new Acrobat JavaScript &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.281.html">Collection</a>&#8221; Object, I&#8217;ve created a few example utility scripts to demonstrate the features of the new object.</p>
<p>There are three basic utility scripts bundled into the one, each one demonstrates a different aspect of working with PDF Portfolios or what the API calls &#8220;Collections&#8221;.<span id="more-50"></span><strong>Combine All Open PDF Portfolios:</strong></p>
<p>This script will look at all of the open PDF files to see which are PDF Portfolios meaning the <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.381.html">collection</a> object returns a value. Then, it will combine all the open PDF Portfolios into a single new PDF Portfolio that contains all the files and metadata from the sources. This version will not maintain folder structure so it&#8217;s best to use on PDF Portfolios that do not contain folders. Creating a new PDF Portfolio through <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.157.html">app.newCollection()</a> is a privileged function so you&#8217;ll need to wrap it in a <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.167.html">trustedFunction</a> to make it work, the code snippet below shows how.</p>
<p><strong>Note:</strong> <a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.167.html">trustedFunction</a> is available only during batch, console and in folder level JavaScripts. Because it is used to elevate the privilege level of the function, you can&#8217;t use it from inside a PDF file.</p>
<pre>
trustedNewCollection = app.trustedFunction (
	function()
	{
		app.beginPriv(); // Explicitly raise the privilege
		var d = app.newCollection();
		app.endPriv();
		return d;
	}
)
</pre>
<p><strong>Copy PDF Document Properties to Portfolio Fields:</strong></p>
<p>This script will run through all of the <a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.323.html">Data Objects</a> in the collection and,<br />
for every PDF that it finds, will use the new &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.334.html#2206831">setFieldValue</a>&#8221; method to copy each item in the &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.396.html">doc.info</a>&#8221; dictionary to a collection metadata field, creating new fields as necessary.</p>
<p><strong>Export Portfolio Metadata to Console:</strong></p>
<p>This script will run through each item in the collection and use the &#8220;<a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.333.html">getFieldValue</a>&#8221; method to create a comma separated values stream from the collection metadata. The script will output to the JavaScript console, you can copy the text from there and massage the data in another application if you need to.</p>
<p><strong>Windows Installation:<br />
</strong></p>
<p>1.	From Windows, select &#8220;Start&#8221; then &#8220;Run&#8221;. Depending on your version,  paste the following line into the text box and press enter</p>
<blockquote><p>%USERPROFILE%\Application Data\Adobe\Acrobat\9.0\JavaScripts</p>
<p>%USERPROFILE%\Application Data\Adobe\Acrobat\10.0\JavaScripts</p></blockquote>
<p>2.	Drag the .js file to that directory</p>
<p>3.	Restart Acrobat if it&#8217;s running.</p>
<p><strong>Mac Installation:</strong></p>
<p>1. Find your version of the directory below. The <strong><span style="color: #ff0000">red</span></strong> parts of the path will change based on your system, choose the right path for your version.</p>
<blockquote><p>/<strong><span style="color: #ff0000">Macintosh  HD</span></strong>/Users/<strong><span style="color: #ff0000">joelgeraci</span></strong>/Library/Application  Support/Adobe/Acrobat/<span style="color: #000000">9.0_x86</span>/JavaScripts/</p>
<p>/<span style="color: #ff0000"><strong>Macintosh HD</strong></span>/Users/<span style="color: #ff0000"><strong>joelgeraci</strong></span>/Library/Application Support/Adobe/Acrobat/10.0_x86/JavaScripts/</p></blockquote>
<p>2.	Drag the .js file to that directory</p>
<p>3.	Restart Acrobat if it&#8217;s running.</p>
<p>You&#8217;ll see a new menu under &#8220;Edit&#8221; called &#8220;Joel&#8217;s Portfolio Utilities&#8221;</p>
<p><a href="https://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/download/ADBE_JFG_PortfolioUtilities_v1.5.js">Download Joel&#8217;s Portfolio Utilities</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pdfdevjunkie/2011/06/joels_pdf_portfolio_utilities.html/feed</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
	</channel>
</rss>

