Bug 13417

Summary: Links in document are highlighted in red while different link color specified
Product: poppler Reporter: colbrac
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: minor    
Priority: low    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: pdf made with pdflatex, utilising hyperref package setting options for links in black without boxes

Description colbrac 2007-11-28 03:04:21 UTC
When creating pdf's from a latex file using pdflatex you can set specific pdf options in the header. I use those to 'mask' the links in the pdf files generated, like so:
\usepackage[pdftex,
	colorlinks={false}, % Color the text of links
	pdfpagelabels, % Make pdfs go 4 (7 of 40) instead of just (7 of 40)
	pdfborder={000}, % Place a white border around links in the pdf
	pdfstartview={FitV}, % with what level of zoom the pdf is opened, here its vertical fit
	pdfpagelayout={SinglePage} % Start the view in scrolling per page instead of continous scrolling
	]{hyperref}
so I expect to see a document without boxes surrounding black links. The colorlinks option is respected, the pdfborder option isn't as far as I can tell. Testing in Adobe Reader 8 shows that the pdf itself is correct.
Any chance this can be corrected? Or is this a 'feature'? :)
Comment 1 Albert Astals Cid 2008-01-19 10:36:14 UTC
the linked url gives a 404 can you please attach the pdf to the bug so that does not happen anymore?
Comment 2 colbrac 2008-01-19 11:38:16 UTC
Created attachment 13800 [details]
pdf made with pdflatex, utilising hyperref package setting options for links in black without boxes
Comment 3 colbrac 2008-01-23 07:10:39 UTC
Possible work around for latex:

Instead of:
\usepackage[
	colorlinks={false},
	pdfborder={000},
	]{hyperref}

Use:
\usepackage[
	colorlinks={true},
	linkcolor=black,
	citecolor=black,
	filecolor=black,
	urlcolor=black,
	]{hyperref}

So instead of no color links and a white border, use colorlinks (which automatically disables the border) and define all colors as being black.
Tested with pdftex on windows (miktex 2.6) and linux (texlive-full, ubuntu 7.10).
Comment 4 Albert Astals Cid 2008-01-23 13:55:01 UTC
It's actually not our bug, so please go and tell the pdflatex people, they create the Link with 

/Border[000]

but border needs to be at least a triplet of numbers, so we fall back to the default value specified in the pdf reference [0 0 1] (where 1 is border width)

They should be generating /Border[0 0 0] for the no border case.
Comment 5 colbrac 2008-01-23 14:01:54 UTC
Thanks for the comment! I will take my bug to them. ;)
Comment 6 Albert Astals Cid 2008-01-23 14:13:49 UTC
Now that i see, maybe it's your bug, could you change your
pdfborder={000}
to
pdfborder={0 0 0}
and see if it works?
Comment 7 colbrac 2008-01-23 14:26:31 UTC
You are correct! Spaces are a necessity. Thanks for the swift response. This saved me another non-bug bugreport which was reported save the account creation process. :P

So for all people wandering by:
The short way to have invisible links in your document:
\usepackage[
        colorlinks={false},
        pdfborder={0 0 0}
        ]{hyperref}
mind the spaces in {0 0 0}!!!
Longer solution which allows for coloring specific link types:
\usepackage[
        colorlinks={true},
        linkcolor=black,
        citecolor=black,
        filecolor=black,
        urlcolor=black,
        ]{hyperref}
which defaults to no border so no pdfborder option needed.

Once again thanks for the help guys!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.