URL 매개 변수를 사용하여 PDF 내에서 북마크에 링크 할 수 있습니까?

StackOverflow https://stackoverflow.com/questions/125632

  •  02-07-2019
  •  | 
  •  

문제

웹 사이트에서 PDF 파일에 대한 링크를 제공 할 때, PDF 브라우저 플러그인 (사용 된 경우)이 처음에 열리는 대신 특정 북마크로 점프 할 수있는 URL (요청 매개 변수)에 정보를 포함시킬 수 있습니까?

같은 것 : http://www.somehost.com/user-guide.pdf?bookmark=chapter3 ?

북마크가 아니라면 특정 페이지로 이동할 수 있습니까?

답이 있다면 Adobe의 PDF 리더 플러그인이나 무언가에만 국한 될 수 있으며 버전 제한이있을 수 있지만 기술이 전혀 존재하는지 여부에 관심이 있다고 가정합니다.

도움이 되었습니까?

해결책

예, 숫자 또는 이름이 지정된 위치별로 특정 페이지에 링크 할 수 있으며 항상 작동합니다. 사용자의 브라우저가 PDF 파일을보기 위해 Adobe Reader를 플러그인으로 사용하는 경우.

숫자 별 특정 페이지의 경우 :

<a href="http://www.domain.com/file.pdf#page=3">Link text</a>

지명 된 위치 (대상)의 경우 :

<a href="http://www.domain.com/file.pdf#nameddest=TOC">Link text</a>


Acrobat을 사용하여 PDF 내에 목적지를 만들려면 :

  1. 원하는 위치를 위해 PDF를 수동으로 탐색하십시오
  2. 보기> 탐색 탭> 대상으로 이동하십시오
  3. 옵션에서 스캔 문서를 선택하십시오
  4. 이 작업이 완료되면 옵션 메뉴에서 새 대상을 선택하고 적절한 이름을 입력하십시오.

다른 팁

RFC 3778 섹션 3은 PDF 파일과 함께 PDF 파일과 페이지를 포함한 "Fragment Identifiers"를 지정합니다.

처리 할 수있는 여러 쿼리 매개 변수가 있습니다. 아래 전체 목록 :

원천

+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| Syntax                  | Description                                                                                  | Example                                              |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| nameddest=destination   | Specifies a named destination in the PDF document                                            | http://example.org/doc.pdf#Chapter6                  |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| page=pagenum            | Specifies a numbered page in the document, using an integer                                  | http://example.org/doc.pdf#page=3                    |
|                         | value. The document’s first page has a pagenum value of 1.                                   |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| comment=commentID       | Specifies a comment on a given page in the PDF document. Use                                 | #page=1&comment=452fde0e-fd22-457c-84aa-             |
|                         | the page command before this command.                                                        | 2cf5bed5a349                                         |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| collab=setting          | Sets the comment repository to be used to supply and store                                   | #collab=DAVFDF@http://review_server/Collab           |
|                         | comments for the document. This overrides the default comment                                | /user1                                               |
|                         | server for the review or the default preference. The setting is of the                       |                                                      |
|                         | form store_type@location, where valid values for store_type are:                             |                                                      |
|                         | ● DAVFDF (WebDAV)                                                                            |                                                      |
|                         | ● FSFDF (Network folder)                                                                     |                                                      |
|                         | ● DB (ADBC)                                                                                  |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| zoom=scale              | Sets the zoom and scroll factors, using float or integer values. For                         | http://example.org/doc.pdf#page=3&zoom=200,250,100   |
| zoom=scale,left,top     | example, a scale value of 100 indicates a zoom value of 100%.                                |                                                      |
|                         | Scroll values left and top are in a coordinate system where 0,0                              |                                                      |
|                         | represents the top left corner of the visible page, regardless of                            |                                                      |
|                         | document rotation                                                                            |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| view=Fit                | Set the view of the displayed page, using the keyword values                                 | http://example.org/doc.pdf#page=72&view=fitH,100     |
| view=FitH               | defined in the PDF language specification. For more information,                             |                                                      |
| view=FitH,top           | see the PDF Reference.                                                                       |                                                      |
| view=FitV               | Scroll values left and top are floats or integers in a coordinate                            |                                                      |
| view=FitV,left          | system where 0,0 represents the top left corner of the visible                               |                                                      |
| view=FitB               | page, regardless of document rotation.                                                       |                                                      |
| view=FitBH              | Use the page command before this command.                                                    |                                                      |
| view=FitBH,top          |                                                                                              |                                                      |
| view=FitBV              |                                                                                              |                                                      |
| view=FitBV,left         |                                                                                              |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| 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.                                               |                                                      |
|                         | Use the page command before this command.                                                    |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| pagemode=bookmarks      | Displays bookmarks or thumbnails.                                                            | http://example.org/doc.pdf#pagemode=bookmarks&page=2 |
| pagemode=thumbs         |                                                                                              |                                                      |
| pagemode=none           |                                                                                              |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| scrollbar=1|0           | Turns scrollbars on or off                                                                   |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| search=wordList         | Opens the Search panel and performs a search for any of thewords in the specified word list. | #search="word1 word2"                                |
|                         | The first matching word ishighlighted in the document.                                       |                                                      |
|                         | The words must be enclosed in quotation marks and separated byspaces.                        |                                                      |
|                         | You can search only for single words. You cannot search for a string of words.               |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| toolbar=1|0             | Turns the toolbar on or off.                                                                 |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| statusbar=1|0           | Turns the status bar on or off.                                                              |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| messages=1|0            | Turns the document message bar on or off.                                                    |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| navpanes=1|0            | Turns the navigation panes and tabs on or off.                                               |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| highlight=lt,rt,top,btm | Highlights a specified rectangle on the displayed page. Use the                              |                                                      |
|                         | page command before this command.                                                            |                                                      |
|                         | The rectangle values are integers in a coordinate system where                               |                                                      |
|                         | 0,0 represents the top left corner of the visible page, regardless of                        |                                                      |
|                         | document rotation                                                                            |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| fdf=URL                 | Specifies an FDF file to populate form fields in the PDF file beingopened.                   | #fdf=http://example.org/doc.fdf                      |
|                         | Note: The fdf parameter should be specified last in a URL.                                   |                                                      |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+

그것을 추가 할 가치가 있습니다 웨인의 해결책 또한 공장 안에:

  • Chrome (2011 년 14 대 이후 이 문제 자세한 내용은) (v. 44에서 테스트),
  • Firefox (40 절에서 테스트),
  • 오페라 (v. 31에서 테스트),

... 그러나 그것은 작동하지 않습니다 안에:

  • Safari (v. 8) (그러나 Apple의 Safari Bug Tracker에 기능 요청이 있습니다)

PDF 열기 매개 변수 사용할 수있는 사용 가능한 URL 조각을 문서화합니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top