Hi,
i open an document and then there is a link in it that opens a new document is there any command that brings me back to the point or document where I come from?
Last Document
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: Last Document
Hello abc123abc123,
I've asked for some help and advise from our devs, and we will post in this topic a bit later.
Best,
Stefan
I've asked for some help and advise from our devs, and we will post in this topic a bit later.
Best,
Stefan
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Last Document
Try to use the following UI-command:
HTH.
Code: Select all
pdfViewer.DoVerb("", "ExecuteCommand", "GoBack", null, PXCVA_Sync);
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: 35
- Joined: Mon Oct 17, 2011 2:36 pm
Re: Last Document
It works but with some problems: I open a new Document now i scroll in this document to an other position and the i press last document i jump at the first time back to the position where i come from when i scrolled. At the second time i press the last doc button i go back to my first document.
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Last Document
Ok. You may try to use other way for your case (pseudocode):
Code: Select all
array_of<string> backHistory;
youreventhandler OnEvent(Type, Name, ...)
{
if (Type == PXCVA_OnDisplayPrompt)
{
string srcName;
if (Name == "Prompts.ConfirmOpenSite")
{
pdfViewer.GetProperty(Name + ".Name", out srcName, 0);
}
else if (Name == "Prompts.ConfirmLaunchFile")
{
pdfViewer.GetProperty(Name + ".FileName", out srcName, 0);
}
if (!srcName.IsEmpty())
{
backHistory.add(srcName);
}
}
}
................................................
yourform
{
OnBackBtn()
{
if (!backHistory.IsEmpty())
{
string srcName = backHistory.GetLast();
backHistory.RemoveLast();
pdfViewer.OpenDocument(srcName);
}
}
}
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: 35
- Joined: Mon Oct 17, 2011 2:36 pm
Re: Last Document
thanks for the hint. Now I got it working...
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: Last Document
Pleasure to hear that abc123 
Cheers,
Stefan

Cheers,
Stefan