Hi,
is there a way to jump to the page with the first available comment?
Best regards
cew
Jump to page with first comment
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: Jump to page with first comment
Hello Cew,
You should be able to do that via JS as well.
Go through your pages, and find the first one with annotations, then use the GotoPage command to go to that page.
Best,
Stefan
You should be able to do that via JS as well.
Go through your pages, and find the first one with annotations, then use the GotoPage command to go to that page.
Best,
Stefan
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: Jump to page with first comment
What do you mean by "as well"?Tracker Supp-Stefan wrote: You should be able to do that via JS as well.
I have not worked with JS in combination with the SDK.
I'd prefere a solution using c#.
Is there another way to get the annotations directly?Tracker Supp-Stefan wrote: Go through your pages, and find the first one with annotations, then use the GotoPage command to go to that page.
Best
cew
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Jump to page with first comment
Hi cew.
Code example for this:
Code example for this:
Code: Select all
int pagesCount;
pdfViewer.GetDocumentProperty(docId, "Pages.Count", out pagesCount);
int i = 0;
int firstPageWithAnnots = -1;
while (i < pagesCount)
{
int annotsCount = 0;
pdfViewer.DoDocumentVerb(docId, "Pages[" + i + "]", "GetAnnotsCount", stub, out annotsCount, 0);
if (annotsCount != 0)
{
firstPageWithAnnots = i;
break;
}
i++;
}
if (firstPageWithAnnots >= 0)
pdfViewer.SetDocumentProperty(docId, "Pages.Current", firstPageWithAnnots, 0);
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: Jump to page with first comment
Great! Thank you!
Best regards
cew
Best regards
cew
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am