1

If I have a pdf file which has not been created with latex, but has named destinations in it, and I want to create a hyperlink in a latex document to those named destinations and show the page number of the named destination (for the benefit of readers of the print version of the latex document)

Is is possible to do something to this effect :

\pageref{url.pdf#nameddestination}

?

5
  • 2
    Should be possible, but how do you know the destination name?
    – user31729
    Commented Oct 8, 2015 at 16:57
  • what is the problem with see page <pagenumber> of the pdf document.... is this pdf file included to the final document? can you show image of this pdf?
    – touhami
    Commented Oct 8, 2015 at 17:03
  • Related/duplicate: [Cross-referencing between different files])tex.stackexchange.com/q/14364/5764)
    – Werner
    Commented Oct 8, 2015 at 17:19
  • I am trying to establish an efficient workflow for myself using the best available tools. I have a legal argument having for example the proposition that "most x's are y's. see a.pdf#xisy1, b.pdf#xisy2". In other words, Commented Oct 10, 2015 at 17:58
  • (continued)... the destination names will be predetermined by the scheme of the argument. I have numerous pdf's downloaded from government websites, of legislative debates, administrative decisions, etc. which are full of miscellaneous bookmarks that I have created over a number of years to "interesting" facts. But now I have to go through it all again, and flag what's relevant, then combine those documents into a single pdf, and be able track the ultimate page numbers so that a judge who may only have the paper documents can flip to the page whereever it ends up. Commented Oct 10, 2015 at 18:17

1 Answer 1

1

\href can be used to link to a destination (e.g., sec:intro) of another PDF document. There are two cases, the PDF is a local file (e.g., file.pdf):

\href{file.pdf#sec:intro}{Introduction (File)}

Then internally the link type is GoToR.

The other option is a URL (e.g., http://example.org/file.pdf), then an URI action is created:

\href{http://example.org/file.pdf#nameddest=sec:intro}{Introduction (URL)}

The syntax for the parameters after # are specified in PDF Open Parameters.

In both cases, it depends on the PDF viewer, what it supports. In the latter case, it also depends on the called browser with its PDF viewing component.

4
  • I gather the answer is "no". So my understanding now is that \pageref gets the information from the .aux file, not from the pdf itself. So what I would need is a utililty to generate an .aux file from a .pdf by extracting the annotations. Commented Oct 10, 2015 at 18:13
  • Note that the .pdf was not generated from latex and the annotations were created by other tools like acrobat etc. I know there is a program called HandyOutliner that extracts bookmarks but its output is xml or text Commented Oct 10, 2015 at 18:29
  • @BillSemenoff The answer deals with the linking to named destinations of another PDF file, it does not say anything, how the referenced PDF file was generated. Commented Oct 10, 2015 at 20:43
  • Extracting destination names, page numbers, ... can be done by programming with a PDF library, see for example the project pax/PDFAnnotExtractor. Commented Oct 10, 2015 at 20:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .