다음은 가능한 가장 간단한 버전입니다. 이렇게하면 URL 왼쪽으로 이동하는 PDF의 왼쪽 하단에 클릭 가능한 영역이 만들어집니다.
[/Rect [ 0 0 200 200 ] % Draw a rectangle
/Action % Define an action
<<
/Subtype /URI % Define the action's subtype as a hyperlink
/URI (http://www.example.com/) % Set the URL
>>
/Border [0 0 0] % Remove the border
/Subtype /Link % Set the type of this PDFmark to a link
/ANN pdfmark % Add the annotation
이 만 클릭 가능한 영역을 만들고, 그러나 : 당신이을 취소 할 수 있습니다, 그래서 테두리가 그려집니다 기본적으로
[/Rect [ 0 0 200 200 ] % Draw a rectangle
/Action % Define an action
<<
/Subtype /URI % Define the action's subtype as a hyperlink
/URI (http://www.example.com/) % Set the URL
>>
/Subtype /Link % Set the type of this PDFmark to a link
/ANN pdfmark % Add the annotation
. 그런 다음에 클릭하여 텍스트를 그릴 필요 :
/Helvetica findfont 16 scalefont setfont % Set the font to Helvetica 16pt
5 100 moveto % Set the drawing location
(http://www.example.com/) show % Show some text
마지막으로, pdfmark
은 기술적 표준에서 정의되지 않은 그들은 당신이 어도비의 증류기를 사용하지 않는 경우에 당신이 그것을 처리하기 위해 무엇인가를 정의하는 것이 좋습니다 있도록. 이 코드는 기본적으로 그냥 컴파일러가 그것을 인식하지 못하는 경우 pdfmark
을 무시합니다 :
/pdfmark where
{pop}
{
/globaldict where
{ pop globaldict }
{ userdict }
ifelse
/pdfmark /cleartomark load put
}
ifelse
을 그리고 여기에 전체 작업의 포스트 스크립트 프로그램입니다 :
%!PS-Adobe-1.0
/pdfmark where
{pop}
{
/globaldict where
{ pop globaldict }
{ userdict }
ifelse
/pdfmark /cleartomark load put
}
ifelse
[/Rect [ 0 0 200 200 ] % Draw a rectangle
/Action % Define an action
<<
/Subtype /URI % Define the action's subtype as a hyperlink
/URI (http://www.example.com/) % Set the URL
>>
/Border [0 0 0] % Remove the border
/Subtype /Link % Set the type of this PDFmark to a link
/ANN pdfmark % Add the annotation
/Helvetica findfont 16 scalefont setfont % Set the font to Helvetica 16pt
5 100 moveto % Set the drawing location
(http://www.example.com/) show % Show some text
showpage
EDIT 이상 또한
, check out this manualpdfmark
에 대한 자세한 지침
EDIT 2
또한 내가 가르치는 목적으로 물건을 배치했음을 지적해야합니다. 대부분의 경우 한 줄 등으로 작성된 /Action
볼 수 있습니다 :
/Action << /Subtype /URI /URI (http://www.example.com/) >>
내가 인 ps2pdf를 사용하여 PS에서 PDF를 만든을, 출력은 아니, 우리가 :(어떤 모양보고 기대하는 것이 아니다 줄을 ... 왼쪽 하단 코넷에 그냥 www.example.com – user702846
@ user702846, 내가 게시 한 것은 PDF에 하이퍼 링크를 추가하는 방법이었습니다. 당신이 이미 나머지를 수행하는 방법을 알고 있다고했기 때문입니다. 하이퍼 링크는 기본적으로 당신이 이전에했던 것처럼 모양과 텍스트를 정확하게 만든 다음이 코드를 사용하여 그 위에 하이퍼 링크를 추가하십시오. –