find methods in COM object

114 Views Asked by At

I'm trying to use the COM object of InDesign Server CS6 to export an InDesign document as a PDF.

Checking the object model viewer that comes with InDesign I find a method 'exportFile()' for the Document object, but using this results in an error telling this method variant does not exist. Using 'export()' instead gives me the correct result, but this method is not in the documentation, so I have no idea what parameters to use.

Is there a way to extract all methods and other usefull information from a COM object directly withou relying on the InDesign documentation which is not always that correct?

1

There are 1 best solutions below

2
On

All the metadata that's available for COM components come from the type library - it's usually embedded in the component as a resource or it could be a separate .tlb file next to the binaries.

Type libraries describe the binary interfaces of the component(s) and support having some documentation - if the type library doesn't have the information you're looking for, it's either in the product documentation or you'll have to talk to the developer of the component and Google for others that may have faced the same issues.

You can use the OLE/COM Object Viewer to inspect type libraries if your IDE doesn't have built-in support already.