In VBA, using the Javascript SaveAs method on a PDF to save as a png or jpg doesn't work
I've recently started using the SDK with the interapplication communication documentation to work with PDF files through VBA (in this case, VBA through Excel).
Presently, I've been able to successfully write code that finds text on a page, sets the correct rectangle bounds around that text, and then crops the PDF to that area. However, when trying to use the Javascript "SaveAs" method, it doesn't work properly. My line of code reads:
JSO.SaveAs wbpath & "\IAR YtD.png", "com.adobe.acrobat.png"Where "JSO" is the name of my Javascript Object and "wbpath" is the string variable containing the path of the excel workbook I'm working with.
The result from using it changes based on if I try to export a Jpg or a Png. As a png, it returns a "write error" saying there isn't enough disc space (when there is plenty). As a jpg, it completely crashes the entire Adobe Acrobat application.
What do I need to do to make saving the PDF file as an image work through VBA?
