[Date Prev][Date Next]
[Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[New search]
To: "'John Bell \(VA\)'" <jbell@xxxxxxxxxx>, <framers@xxxxxxxxx>
Subject: RE: Opening an Acrobat document from an application
From: "Thomas Michanek" <thomas.michanek@xxxxxx>
Date: Fri, 8 Feb 2002 19:05:55 +0100
Importance: Normal
In-Reply-To: <46D5E54FF6972C4CAA22B65747A573AE098317@smtexmb05.siebel.com>
Reply-To: <thomas.michanek@xxxxxx>
Sender: owner-framers@xxxxxxxxx
> I seem to recall that it is possible to have an application > call Acrobat to open a PDF and display a specified page > (bookmark? Named Destination?). This way the application can > treat the PDF like online help. > > Is this possible, and if so what do I need to put in my FrameMaker > files to make it possible? > What would the calling syntax look like in the application? > > Thanks! > --- John Bell I have dug up a more complete answer to the above question, which may be of interest to a broader audience (Free Framers): This description is valid for Acrobat 4 and FrameMaker 5.5.x. I doubt there are any changes for Acrobat 5 or FrameMaker 6. There is no way to specify a location to open a PDF file on by calling the Acrobat Reader application (acrord32.exe). There are no command-line options or API functions for this. It is *possible* that you can do it by calling the "full" Acrobat application (acrobat.exe), but I'm not sure, and this would require all users to buy the full Acrobat package. So, if you need to open up the PDF file by directly calling a free Acrobat application, it cannot be done. However, it *is* possible to specify a location for a PDF file if you take advantage of the Acrobat Reader plug-in for a commercial web browser, e.g. Internet Explorer or Netscape. This plug-in is normally installed automatically when you install the free Acrobat Reader. Thus, by calling a web browser and providing a URL to the PDF file, you can specify a location to open the file on. What happens is that the web browser recognizes the PDF file extension, starts the Acrobat Reader plug-in, and displays the PDF file within the browser window, at the location (if any) specified by the URL. You should note that this process can be somewhat slow, so don't expect short response times. There is an important restriction: for the Windows version of Internet Explorer, you can only get reliable results for PDF files with specified locations by placing the PDF file on an Intranet or the Internet, thus using a web URL of the type "http://...". If you try to use a file URL for a file located on a local file system ("file://..."), you will get invalid or unreliable results, due to the way IE is integrated into the Windows operating system... This restriction does *not* apply to Netscape or to non- Windows versions of Internet Explorer. If you can assume that users won't be using the Windows version of IE, then you can safely use URL links to files on a local file system. A "location" in a PDF file can be either a physical page number of the PDF file, or a so-called "named destination" defined in the PDF file. URLs for these cases look like: .../filename.pdf#page=X .../filename.pdf#destination where "X" is the page number, and "destination" is the name of a named destination (defined in the PDF file). If the PDF file is generated from FrameMaker, an alternative URL for the case of a page number is: .../filename.pdf#P.X where "P." is case-sensitive, and "X" is the page number. If you don't want to be restricted by specifying page numbers (which may change when the source document is edited), you have to define named destinations and use them instead. Named destinations can be added to an existing PDF file by using the full Acrobat application (not the Reader), but such manually added destinations are lost whenever the PDF file is re-generated or replaced with a new version. If you have access to the source file of the PDF and its application, you can add named destinations to the source file, which will be transferred to the PDF file. In the case of FrameMaker, you would add hypertext markers using the syntax "newlink destination". Unfortunately, such destination names are somewhat mangled when a PDF file is created from the FM file, according to the following: * A hypertext marker with the text "newlink entrypoint" will become a destination named "M8.newlink.entrypoint" in a PDF created from it. If the file is part of a book file and a book PDF file is created, the destination will become "M#.8.newlink.entrypoint", where # is the ordinal number of the file in the book. The "M8." indicates the destination originated as a hypertext marker. * Any spaces in the marker text are replaced by periods, and any underscores are removed ("my entry_point" => "my.entrypoint") So, a URL for a named destination in an FM file may look like: [http://|file://].../filename.pdf#M8.newlink.entrypoint I think that's all :-) - - - - - - - - - - - - - - - - - - - - - - Thomas Michanek, FrameMaker/UNIX/MIF expert IAR Systems AB, Sweden: http://www.iar.com mailto:Thomas.Michanek@iar.se Tel: +46 18 167800, Fax: +46 18 167838 - - - - - - - - - - - - - - - - - - - - - - ** To unsubscribe, send a message to majordomo@omsys.com ** ** with "unsubscribe framers" (no quotes) in the body. **