On point 2.2.1.33 in your help i found the following:
Source file name, or valid URL, or Stream Object. The source-URL can
contains some special open-actions(see PDF Open Parameters).
Some examples:
http://www.mysite.com/test.pdf#page=2&zoom=150
file:///C:/test.pdf
C:\test.pdf
Now i want to open a pdf with the parameter page=5. what do i need to do this. I tried different things for example:
pdfViewer.openDocument("C:\...\test.pdf#page=5");
i only get an error that says the file C:\...\test.pdf#page=5 could not be found
Open Parameters
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: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Open Parameters
You cannot use this method for local files.
For your case you should use:
For your case you should use:
Code: Select all
int docId;
pdfViewer.openDocument("C:\...\test.pdf", 0, out docId);
if (docId > 0)
{
pdfViewer.SetDocumentProperty(docId, "Pages.Current", 5);
}
...
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: Open Parameters
In the help i can find the method "36010" to go to a named Bookmark.
When i try it i get the message : The command is disabled Currently.
No i thougt i could enable it so: _PdfViewer.SetProperty("Commands[#36010].state", "online");
What do I need to jump to a named destination. Is there an other Command?
When i try it i get the message : The command is disabled Currently.
No i thougt i could enable it so: _PdfViewer.SetProperty("Commands[#36010].state", "online");
What do I need to jump to a named destination. Is there an other Command?
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Open Parameters
Hello abc123abc123,
I have asked the guys for some additional comments, but I believe that you can use JS code and the gotoNamedDest method for that.
Best,
Stefan
I have asked the guys for some additional comments, but I believe that you can use JS code and the gotoNamedDest method for that.
Best,
Stefan
-
- User
- Posts: 35
- Joined: Mon Oct 17, 2011 2:36 pm
Re: Open Parameters
I have now a Method called runJavaScript and in this i have an object Bookmark and a method gotonameddest.
How can I bring them together? I found no examples in the Help
How can I bring them together? I found no examples in the Help
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: Open Parameters
if you have bookmark in JS, try to use its execute() method.
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Open Parameters
The UI-command #36010 (GotoBookmark) is working only with our bookmarks-view and if any bookmark is already selected in this view. This command cannot help you...
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.