Article View: adobe.scripting.indesign
Article #1821Re: Extract indesign preview
From: Thomas_B._Nielsen
Date: Mon, 19 Jan 2009 16:35
Date: Mon, 19 Jan 2009 16:35
11 lines
1225 bytes
1225 bytes
var myString = myDocument.metadataPreferences.getProperty("http://ns.adobe.com/xap/1.0/","Thumbnails/*[1]/xmpGImg:image");
// replace - <http://www.adobeforums.com/webx?128@@.3bbcb337>
myString = myString.replace("
", "\n");
will extract the base64 encoded data.
using the script <http://www.webtoolkit.info/javascript-base64.html> i thought i could decode the preview and then save to a file, but i get a invalid JPEG file.
However, feeding the script on the folowing url with the encoded string, forcing download, will produce a valid jpeg.
<http://opinionatedgeek.com/dotnet/tools/Base64Decode/Default.aspx>
Technical Details
Message-ID:
<59b78cb1.1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossingReferences:
<59b78cb1.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,d958fa7bb0441ef4 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Thomas_B._Nielsen@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Extract indesign preview Message-ID: <59b78cb1.1@webcrossing.la2eafNXanI> Date: Mon, 19 Jan 2009 08:35:20 -0800 References: <59b78cb1.-1@webcrossing.la2eafNXanI> Lines: 15 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit