Skip to main content
daitranthanhoa
Inspiring
Apr 4, 2017 3:54 AM UTC
Answered

How can saveAs a PDDoc to image file?

My code process save PDDoc to Image:

PDDoc NewDoc = PDDocCreate ();

ASPathName imagepath ="E:\\Acrobat 10 SDK\\TestData\\Image.png"

imagepath = ASFileSysCreatePathName(NULL, ASAtomFromString("Cstring"),  str, 0);

AVDocOpenFromPDDoc(NewDoc, NULL);

PDDocSave(NewDoc, PDSaveFull | PDSaveLinearized, imagepath, NULL, NULL, NULL);

But result Image.png error can't  open.

How can saveAs a PDDoc to image file?

Thanks all.

This topic is closed to new replies. Start a new post to keep the conversation going.
Test Screen NameCorrect answer
Legend
Apr 4, 2017 7:56 AM UTC

Plugins should be using the AVConversion APIs. In the UI and scripting this is made to seem part of Save processing but it is not.

4 replies

Bernd Alheit
Community Expert
Community Expert
Apr 4, 2017 4:49 AM UTC

Image.png is a PDF document, not a image file.

Translate
daitranthanhoa
Inspiring
Apr 4, 2017 7:13 AM UTC

SDK support saveAs to image?

Translate
Bernd Alheit
Community Expert
Community Expert
Apr 4, 2017 7:51 AM UTC

Look at the saveAs method in the Acrobat JavaScript Reference.

Translate