Quantcast
Channel: Adobe Community : Unanswered Discussions - Acrobat
Viewing all articles
Browse latest Browse all 73766

Acrobat Reader X and PDDocSave

$
0
0

I am developing a plugin for Acrobat X and Reader X. Both plugins use the same code to perform a Save As operation. I use the active pdf on screen and save it as a new pdf with a different name using PDDocSave. This works fine for Acrobat, but I get the error "An unimplemented or obsolete function was called" when using the plugin in Reader. My plugin is reader-enabled. The pdf files I am operating on are basic pdfs with some text in them. Any help would be appreciated.

 

Here is my code:

 

PDDoc pDoc = AVDocGetPDDoc(avDoc);

CString strNewFilePath(pbstrNewFilePath.GetBSTR());

 

char *chrNewFilePath = _W2M( strNewFilePath.GetBuffer() );

 

ASText  asFilePath =  ASTextFromUnicode(reinterpret_cast <ASUTF16Val *> (chrNewFilePath), kUTF8);

::free(chrNewFilePath);

 

ASFileSys  asFileSys =  ASGetDefaultFileSysForPath(ASAtomFromString( "ASTextPath" ), asFilePath);

 

ASPathName asNewPath =  ASFileSysCreatePathName(asFileSys,  ASAtomFromString( "ASTextPath" ), asFilePath, 0);

 

//Need to save the active pdf as a different file

PDDocSave( pDoc, PDSaveFull , asNewPath, asFileSys, NULL, NULL);

 

Thanks,

Howie


Viewing all articles
Browse latest Browse all 73766

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>