General Question

imrainmaker's avatar

Can you answer this technical question(Details inside..)?

Asked by imrainmaker (8380points) December 11th, 2016

Is it possible to navigate to specific location in PDF ( not page but position say X position from top) programmatically? I’m not talking about bookmarks here.

Observing members: 0 Composing members: 0

3 Answers

Call_Me_Jay's avatar

Yes. It’s been years, but in a past job I had to write into PDFs programmatically. At it’s core, a PDF is a page description typed out in plain text.

To give you an idea of the mechanics, here are the methods available in PHP: PHP PDF Functions

UPDATE: I see you specified “navigate” and the PHP functions above are for creating PDFs.

I know it’s possible, I do not know offhand how to do it.

Call_Me_Jay's avatar

I found this Parameters for Opening PDF Files (it’s a PDF!).

Pertinent items:
1)
nameddest=destination
Specifies a named destination in the PDF document

2)
viewrect=left,top,wd,ht
Sets the view rectangle using float or integer values in a
coordinate system where 0,0 represents the top left corner of the
visible page, regardless of document rotation.

3)
view=Fit
view=FitH
view=FitH,top
view=FitV
view=FitV,left
view=FitB
view=FitBH
view=FitBH,top
view=FitBV
view=FitBV,left
Set the view of the displayed page, using the keyword values
defined in the PDF language specification. For more information,
see the PDF Reference.
Scroll values left and top are floats or integers in a coordinate
system where 0,0 represents the top left corner of the visible
page, regardless of document rotation.
Use the page command before this command.
Note: This parameter is not supported on the command line.

imrainmaker's avatar

^^ Thanks a lot..I will try it..)

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther