Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - open a pdf at a special page
  FAQ FAQ  Forum Search   Register Register  Login Login

open a pdf at a special page

 Post Reply Post Reply
Author
Message
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Topic: open a pdf at a special page
    Posted: 19 Jan 07 at 3:28AM
Hi!

From time to time this question appears again ...
How to start a linked file ...
That's easy:
ShellExecute(hinstance,'open',PChar('c:\temp\test.pdf'), nil,  nil,SW_SHOWNORMAL);
You can use it in Delphi and (a bit modificated) in any other language.

I want to open the pdf-file at a special page. It should be temporarely (so i can't use SetOpenActionDestination).
I know that there are special parameters from adobe to do this?

How should i modify my ShellExecute to use this additional parameter?

Thanks a lot in advance!
Ingo



Edited by Ingo - 19 Jan 07 at 3:29AM
Back to Top
ukobsa View Drop Down
Senior Member
Senior Member


Joined: 29 May 06
Location: Germany
Status: Offline
Points: 115
Post Options Post Options   Thanks (0) Thanks(0)   Quote ukobsa Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jan 07 at 9:14AM
Ingo,

this works for me on commandline:

"c:\Programme\Adobe\Acrobat 7.0\Reader\acrord32.exe" /a page=4 "d:\temp\RDF Primer.pdf"

Have also a look on this document

HTH,
Ulrich
Back to Top
bogey View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Nov 05
Location: United States
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote bogey Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jan 07 at 11:26AM
Thanks Ingo,
 
I recently was asked this question both two different people. Now I have an answer other than "I am sure there must be a way, but I don't know how."
 
 
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jan 07 at 2:31PM
Hi Uli!

Thanks a lot!
Like Ken said: I was one who told there is a parameter but i don't know how and where ;-)
...and now it's so easy ... but hard to find.

Best regards,
Ingo
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 22 Jan 07 at 2:59PM
Hello!

I want to use ShellExecute having a universal call for the main readers ;-)
With Uli's help i've made this calls (Delphi):

In my test i wanted to open the document on page 4.

s := GetProgramAssociation('pdf');
s := PathGetLongName(s);

// example Foxit Reader
s := '"' + s + '"';
c := '"' + 'c:\temp\test.pdf' + '"' + ' -n 4';
ShellExecute(hinstance,'open',PChar(s), PChar(c), nil,SW_SHOWNORMAL);

// example Acrobat Reader
s := '"' + s + '"';
c := '/a page=4 ' + '"' + 'c:\temp\test.pdf' + '"';
ShellExecute(hinstance,'open',PChar(s), PChar(c), nil,SW_SHOWNORMAL);

You see each reader has its own parameter syntax for things like opening with pagenumbers. So if you want to open a pdf on a special page with all main readers you have to use "SetOpenActionDestination" with a copied version of the relevant pdf...

Best regards,
Ingo



Edited by Ingo - 22 Jan 07 at 3:00PM
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store