Hotlink to open PDF at specific page

655 views
Skip to first unread message

Katherine Bo

unread,
Sep 20, 2013, 1:38:30 PM9/20/13
to mapi...@googlegroups.com
Is there a way to include a parameter in a hotlink to specify which page a PDF should open at?

I've done this in the past in ArcMap using the form c:\example.pdf ?/A "Page=2=OpenActions" but I haven't been able to find anything similar in MapInfo.

Thanks,

Katherine


Bill Thoen

unread,
Sep 20, 2013, 6:55:34 PM9/20/13
to mapi...@googlegroups.com
Google on 'adobe pdf  "open to page".' You'll see there's lots more you can do too.

David Reid

unread,
Sep 20, 2013, 9:49:12 PM9/20/13
to mapi...@googlegroups.com
From an HTML document:
 
Would open the specified PDF to page 10, zoom set to 50% and scrollbars turned off.
 
But neither have I been able to adapt this to a hotlink in Mapinfo :(
 
-Dave


From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On Behalf Of Bill Thoen
Sent: Friday, September 20, 2013 5:56 PM
To: mapi...@googlegroups.com
Subject: Re: [MI-L] Hotlink to open PDF at specific page

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
 
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Katherine Bo

unread,
Sep 22, 2013, 11:17:41 AM9/22/13
to mapi...@googlegroups.com
Hi Bill,

Thanks for your reply. Do you know the form to use to get this to work as a Hotlink in MapInfo? I've tried the URL form (c:\example.pdf#page=2), the command line form, and the form used by ArcGIS (c:\example.pdf ?/A "Page=2=OpenActions") but it fails each time.

Thanks

Bill Thoen

unread,
Sep 22, 2013, 2:21:28 PM9/22/13
to mapi...@googlegroups.com
No, sorry. I don't know much about hotlinks details. Never had to look into it. And I know even less about ArcGIS.

Regards,

Bill Thoen
GISnet
--

Mike Osbourn

unread,
Sep 22, 2013, 6:49:53 PM9/22/13
to mapi...@googlegroups.com

Katherine,

 

Take a look at the url below for some parameters for opening pdf documents.  I tested this and it seems to work fine..  http://yourwebite.com/pdffile.pdf#toolbar=1&search="searchword"  although it’s not for opening to a specific page it does search and return whatever value is specified after the search= component. 

 

Is your question more on how to create a hotlink with parameters in MI Pro rather than what the syntax is for PDF document opening?  Are the files hosted on a website or inside your local network via a unc or drive reference?  If that is the case then you may have to kick off the adobe reader executable prior to opening the pdf file.  I’m not sure on that one due to file associations etc.  I generally try to embed the executable file name for whatever type of file I’m wanting to open via a hotlink since some users may actually change the file associations on their specific machines sometimes.  One other thing to consider is writing the hotlink values etc to the meta data of the tab file.

 

URL for pdf parameters….

 

http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf

 

Below is a snippet of one of our files where the hotlink is embedded in the meta data..

 

  Fields 20

    Case Char (8) Index 1 ;

    Name Char (35) Index 2 ;

    Type Char (3) ;

    Pin Char (15) ;

    Status Char (10) ;

    Map Char (4) ;

    Sheet Char (2) ;

    Date Date ;

    Pin2 Char (15) ;

    New_street Char (1) ;

    Taxdist Char (4) ;

    Xcoord Decimal (11, 0) ;

    Ycoord Decimal (10, 0) ;

    Fire_dist Char (20) ;

    Usps_commu Char (20) ;

    Jurisdicti Char (20) ;

    Image_url Char (120) ;

    Scanid Char (15) ;

    Deleted Char (15) ;

    Mi_prinx Decimal (11, 0) ;

begin_metadata

"\IsReadOnly" = "FALSE"

"\ActiveObject" = ""

"\ActiveObject\Expr" = """http://websiteaddress.com/add_scans/""+""ap""+mi_prinx+"".pdf"""

"\ActiveObject\Mode" = "HOTLINK_MODE_OBJ"

"\ActiveObject\Relative" = "FALSE"

"\Info" = ""

"\Info\Date" = "01/25/2011"

end_metadata

 

HTH

 

Mike

 

 

 

From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On Behalf Of Katherine Bo
Sent: Sunday, September 22, 2013 11:18 AM
To: mapi...@googlegroups.com
Subject: Re: [MI-L] Hotlink to open PDF at specific page

 

Hi Bill,

--

Katherine Bo

unread,
Sep 23, 2013, 9:45:07 AM9/23/13
to mapi...@googlegroups.com
Hi Mike,

Thank you for this information. You are right in that I would like to know how to create a hotlink which includes the parameter to open the pdf at a specific page. The PDF is stored on my hard drive rather than hosted on the web. Do you know if this is possible?

Katherine

SCISOFT

unread,
Sep 23, 2013, 11:23:32 AM9/23/13
to mapi...@googlegroups.com

As Mike Osbourn indicated for the Adobe PDF Reader, the use of parameters is well documented: see under Parameters on page 5 of the link he gave [here]. If the PDF file is stored on your computer, you just prefix the filename with its location on your hard drive. Simple.

So, if Acrobat Reader 11.0 is installed here: C:\Program Files (x86)\Adobe\Reader 11.0\Reader\      (on my 64-bit Windows 7 system)

and its filename is AcroRd32.exe

and you want to open page 9 of the PDF file “MyDocument.PDF” located at C:\SomeFolderName\, then the string you need will be –

“C:\Program Files (x86)\Adobe\Reader 11.0\Reader\ AcroRd32.exe”   /A “page=9” “C:\SomeFolderName\ MyDocument.PDF”

Note that the quotes are important.

And the hotlink code given by Mike should be easy to follow.

For other PDF viewers the parameter syntax may differ, but many other PDF viewers such as PDF_XChange use  a very similar if not identical syntax to Adobe’s  

  PDFXCview.exe /A "page=9&zoom=200,250,100" mypdffile.pdf )

(omitting the path information)

Ian Thomas
Scientific Software

 

From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On Behalf Of Katherine Bo
Sent: Monday, September 23, 2013 9:45 PM
To: mapi...@googlegroups.com
Subject: Re: [MI-L] Hotlink to open PDF at specific page

 

Hi Mike,

Reply all
Reply to author
Forward
0 new messages