These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Open to specific page from command line will not work if already open

karma
Registered: Dec 19 2009
Posts: 6

I've got a C++ application that opens a specific PDF file to a specific page location.

I've use the open parameters to open from a command line as specified in this document:
http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf.

It does work...sort of. The problem is:

- If the document is not open, it works perfectly - the pdf opens, and goes to the correct page.

- If the document is already open, the the pdf comes to the front, but the page does not change. In other words, if you try to send it a different page number, and it is already open, the page will not change.

This is somewhat useless then, since you cannot make the user close the document every time he clicks on a link that might open to a different page.

I've searched this forum and seen this same question asked in several different ways (also related to doing this same thing with an html link to an online doc) - and the problem is the same, and it never receives a decent answer - or a solution. Hoping this time might be different. ;) Thanks!

This is being tested on Windows XP SP3 with Acrobat Reader 8.1.3.

daka630
Expert
Registered: Mar 1 2007
Posts: 1420
Hi,

Keep in mind that the referenced document is for [i]Open[/i] parameters;
so, of course the parameters function by opening...Earlier dot releases of Acrobat had some issues with resolving URL links within certain environments (local machine,
network server, web server). Those issue were resolved.

With that said, "Open" parameters' documentation never identified that the parameters were meant to process on an already open PDF. That's just not what it did for earlier versions of PDF; nor, just now. Perhaps in some upcoming release (?).

Once one is "in" a PDF, there are other navigation modalities that are superior.
Bookmarks, intra-file links, and inter-file links come to mind.
These function in either webspace or network space.
All can be pre-staged in an appropriate authoring environment.

Be well...

Be well...

karma
Registered: Dec 19 2009
Posts: 6
Thanks for the response.

daka630 wrote:
With that said, "Open" parameters' documentation never identified that the parameters were meant to process on an already open PDF. That's just not what it did for earlier versions of PDF; nor, just now. Perhaps in some upcoming release (?).
No, but it would be logical. Imagine the man-hours, man-weeks and man-years of engineering workarounds that wouldn't be necessary. ;)

Quote:
Once one is "in" a PDF, there are other navigation modalities that are superior.
Bookmarks, intra-file links, and inter-file links come to mind.
These function in either webspace or network space.
All can be pre-staged in an appropriate authoring environment.
OK, so how does one use "some other method" to go to a specific page in an OPEN pdf with a call from an external application? How do I tell an open PDF to go to a bookmark, or any other "marker", from an external application, with a function call?
karma
Registered: Dec 19 2009
Posts: 6
No ideas?

What appropriate authoring environments allow me to "pre-stage" this? (I'm not sure what that means)...

Alternately, is there a way to close an open PDF file (procedurally, from within an application)? Thanks...
GegardJames
Registered: Jan 6 2010
Posts: 2
"Alternately, is there a way to close an open PDF file (procedurally, from within an application)!"

I don't think this is possible. I've been trying to do it with no luck. Does anyone else know if this is possible because this woulkd be useful for me.
[url=http://honestreview4u.com/bowtrol]Bowtrol[/url] | [url=http://honestreview4u.com/]Web Marketing[/url]
daka630
Expert
Registered: Mar 1 2007
Posts: 1420
Hi karma,

Quote:
What appropriate authoring environments allow me to "pre-stage" this? (I'm not sure what that means)...
Navigation, within or between PDFs, can be accomplished easily with PDF Bookmarks, links within a PDF, and links between PDFs. Add Catalog indexes for advanced search of individual PDFS and PDF collections. With adequate metadata included and, if well-formed tagged PDF, then metadata and structure tag searches are possible.

Some authoring applications support pre-configuration of what is to be linked, to be a bookmark, etc. Some provide robust tag management. All 'upfront'.
The output PDF(s) provide have robust user navigation "built-in"
The PDF Open Parameters are nice for the rather specific usage they provide but
lack the 'juice' provided by PDFs created for ease of use by end-users.
Done reasonably well, they become easier to use than falling of a log in the water.Be well...

Be well...

karma
Registered: Dec 19 2009
Posts: 6
daka630 wrote:
Hi karma,
Quote:
What appropriate authoring environments allow me to "pre-stage" this? (I'm not sure what that means)...
Navigation, within or between PDFs, can be accomplished easily with PDF Bookmarks, links within a PDF, and links between PDFs. Add Catalog indexes for advanced search of individual PDFS and PDF collections. With adequate metadata included and, if well-formed tagged PDF, then metadata and structure tag searches are possible.

Some authoring applications support pre-configuration of what is to be linked, to be a bookmark, etc. Some provide robust tag management. All 'upfront'.
The output PDF(s) provide have robust user navigation "built-in"
The PDF Open Parameters are nice for the rather specific usage they provide but
lack the 'juice' provided by PDFs created for ease of use by end-users.
Done reasonably well, they become easier to use than falling of a log in the water.
Thanks, but this is all very nebulous and generic. And I know what bookmarks do. ;)

How do I go to a bookmark in a specific PDF file from within my application code? How do I make it so that a user chooses some menu item in my application, and it results in going to a specific link in a specific PDF file, whether it is open already or not?

Please name one specific "authoring environment" that will allow me to create a pdf that will do that, instead of saying "there are many things out there..." I'll buy it. Thanks.
daka630
Expert
Registered: Mar 1 2007
Posts: 1420
Hi,

It seems that you want to let end-users "get in and about" with PDFs.
PDFs built to provide this will, most times, in most circumstances, trump
trying to do the job with external applications. Why? The answer, fundamentally,
lies in what PDF is at its core.

With that said, "getting" to PDF from an external application can be awkward.
PDF, being an augmented page description language, is something of a closed system.
More so today due to security concerns.

Perhaps a browse through of the AUC JavaScript forum and focused questions posted
there may provide more specific information to your situation.

Posts by Thom Parker (thomp) may be particularly useful.
He has provided a fair amount of information associated with programmatic interaction with PDF.

Be well...

Be well...

kocmoc
Registered: Jan 22 2011
Posts: 1
Hi.

I just ran into the same problem in oening pdf doc in frame of my site.

1st open goes nice, but other do not take effect.

only way i found out is making redirect pages FOR EACH page of html, which granted reopening it at needed page.

And yes, i found another solution in creating auto-redirect html page, which gets params from url and autoredirects there. SO, if we pass url with new page of pdf, it will reopen it as needed!

Im cool =)