[Date Prev][Date Next]
[Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[New search]
To: "Suzette Leeming" <suzette.leeming@xxxxxxxxxxxx>, <framers@xxxxxxxxx>
Subject: Re: Linking to Named Destinations
From: "Thomas Michanek" <thomas.michanek@xxxxxxxxx>
Date: Sun, 8 Aug 2004 17:42:45 +0200
Delivered-to: jeremyg-freeframers:org-ffarchiv@freeframers.org
References: <000e01c47bd9$4c1ee7b0$6800a8c0@MOM>
Sender: owner-framers@xxxxxxxxx
> Our applications are brower based, and we current have a question mark > on web pages, which call the pdf file from our company's intranet. We want > to be able to link to a specific part of the pdf, so if a user is working on > the web page to create widgets, when they click the question mark, the pdf > will open to the section on creating widgets. > > Linking to page numbers won't work because our documents change too > often (thereby changing page numbers) and doing the linking in Acrobat > wouldn't be suitable because everytime our documents change, we create a new > pdf. This is a summary of an investigation I made a few years ago. You may probably skip the first paragraph(s), but I'll include them here for completeness. The solution you're after can be found at the end of this message. In general, there is no way to specify a location to open a PDF file on by calling an Acrobat Reader application directly. 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. Thus, by calling a web browser and providing a URL to the PDF file, you can specify a location to open the file on. 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 ___________________________________________ Thomas Michanek, FrameMaker/UNIX/MIF expert Technical Communicator, Uppsala, Sweden mailto:Thomas.Michanek@xxxxxxxxx http://go.to/framers/ ___________________________________________ ** To unsubscribe, send a message to majordomo@xxxxxxxxx ** ** with "unsubscribe framers" (no quotes) in the body. **