[MacRuby-devel] Scripting Bridge

Matt Aimonetti mattaimonetti at gmail.com
Tue Nov 1 18:34:20 PDT 2011


Yes, I also saw these warnings (not errors). The header file and the
bridgesupport look good here on Lion.
I did some more tests and here is what I got:

I was able to package the document with the following script:

framework 'Foundation'
framework 'ScriptingBridge'
load_bridge_support_file 'inDesign.bridgesupport'
app = SBApplication.applicationWithBundleIdentifier('com.adobe.indesign')
doc = app.activeDocument
doc.packageTo("/Users/mattetti/tmp/testPackage", copyingFonts:true,
copyingLinkedGraphics:true, copyingProfiles:true, updatingGraphics:true,
includingHiddenLayers:true, ignorePreflightErrors:true,
creatingReport:true, versionComments:"this is a test", forceSave:true)

# To generate a IDML (that seems to crash indesign after it's done)
#app.generateIDMLSchemaTo("/Users/mattetti/tmp/idmlPackage",
packageFormat:false)

# I tried the following without success, probably because I don't know how
the API works and how the export preset should be set :p
page = doc.pages.first
app.rasterizeDocumentPageDocument(doc, index:0, width:1024, height:768,
to:"/Users/mattetti/tmp/page0.jpg", params:{}, cropBox: 0.2)
page.asynchronousExportFileFormat("tagged text/PDF",
to:"/Users/mattetti/tmp/page1.pdf", showingOptions: false, using:
app.PDFExportPresets.first, versionComments: "test", forceSave: true)
page.exportFormat("tagged text/PDF", to:"/Users/mattetti/tmp/page2.pdf",
showingOptions: false, using: app.PDFExportPresets.first, versionComments:
"test", forceSave: true)

- Matt



On Tue, Nov 1, 2011 at 4:50 PM, Spencer Rose <dspencerr at gmail.com> wrote:

> Did you get a bunch of errors like this:
>
> sdp: warning: skipping redeclared enumeration "inDesignOTpf"
> sdp: warning: skipping redeclared enumeration "inDesignJrua"
>
> when making your header?   I am getting errors when making the
> header file, and I am sure that is the reason for errors when making
> the brigesupport file.  I will do more research, just wondering.
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20111101/0e200daf/attachment.html>


More information about the MacRuby-devel mailing list