Ask a Question related to Adobe Acrobat SDK, Design and Development.
-
yiyun0918@adobeforums.com #1
AVDocGetNthPageView
Hello,
When Reader open PDF document,I want use AVDocGetNthPageView to get the seconde page's AVPageView, but that got an exception.
Here is the codes:
ACCB1 void ACCB2 MyAVDocDidOpen (AVDoc doc, ASInt32 error, void* clientData)
{
try
{ int i=0,num = 0;
AVPageView pageView ;
pageView = AVDocGetNthPageView(doc,0);
ASBool bNext = false;
do
{
PDDoc pdDoc;
PDPageNumber pageNum;
ASFixed scale;
bNext= AVPageViewGetNextView(pageView,&pdDoc,&pageNum,&sc ale);
if (bNext)
pageView = AVDocGetNthPageView(doc,pageNum);
} while(bNext);
}
catch(...)
{
char buf[512];
TRACE(ASGetErrorString(ERRORCODE, buf, sizeof(buf)));
}
}
yiyun0918@adobeforums.com Guest
-
Leonard_Rosenthol@adobeforums.com #2
Re: AVDocGetNthPageView
It sounds like you are misunderstanding what an AVPageView is. It's NOT a view on a specific page # from a document - it's the actual VIEW of the CURRENTLY VIEWED page(s)...Remember that you can be viewing multiple pages at once, and that's where that API comes into play. BUT it's only useful if there are multiple pages showing.
And in the AVOpenDoc callback - NOTHING is showing (yet).
Leonard_Rosenthol@adobeforums.com Guest



Reply With Quote

