1 person found this helpful
DDX is the best option to do this.
Follow the below link to extract attachments from pdf document.
Hope this will help you.
Imports an external file into the document and associates the specified name with the data object. Data objects can later be extracted or manipulated.
Related objects, properties, and methods are dataObjects, getDataObject, openDataObject, createDataObject, exportDataObject, removeDataObject, getDataObjectContents, and setDataObjectContents, and the Data Object.
When a file attachment is imported using importDataObject, the value of its Data.name is assigned by the parameter cName. However, when a file is attached using the UI, its name is automatically assigned. The attachments are assigned the sequential names “Untitled Object”, “Untitled Object 2”, “Untitled Object 3”, and so on.
true on success. An exception is thrown on failure.