Updated - I am working on retrieving data from a large number of Excel workbooks using C#. There are some important pdf documents that are embedded in the workbooks. I need to save them as individual document for further processing.
I am able to loop through all oleObject in all worksheets and find all pdfs.
I used progID in DocumentFormat.OpenXml.Spreadsheet to identify the pdfs https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.oleobjects?view=openxml-2.8.1
foreach(Worksheet ws in xlWb.Worksheets)
{
foreach (OLEObject ole in ws.OLEObjects())
{
//identify whether the oleObject is of AcroExch class type
if(ole.progID == "AcroExch.Document.DC")
{
//2. Cast oleObject to AcroExch and save it as a pdf separately
}
}
}
From what I gathered online, using acrobat dc sdk seems to be the only option. Is there any other way to achieve what I want?
Thanks