TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to set the color of the border for my text fields to be none. But the parameter doesn't seem to accept none as a value. Here is an example:

\documentclass[12pt]{article}
\usepackage{hyperref}
\usepackage{xcolor}

\begin{document}

\begin{Form}
\TextField[name=formname,bordercolor=none,width=6cm] {\mbox{}}
\end{Form}

\end{document}

Is there a way to make this work?

Also with the backgroundcolor parameter.

share|improve this question
    
I found the solution below by chance. I am posting this since I think this might be useful for others who might face the issue. – Kaveh Dec 6 '13 at 21:22
up vote 3 down vote accepted

The solution is to leave the value empty and use bordercolor=. Here is the example:

\documentclass[12pt]{article}
\usepackage{hyperref}
\usepackage{xcolor}

\begin{document}

\begin{Form}
\TextField[name=formname,bordercolor=,width=6cm] {\mbox{}}
\end{Form}

\end{document}
share|improve this answer
    
bordercolor={1 1 1} (white) also works, although it is not a documented default. – alfC Sep 9 '15 at 18:46
    
@alfC, I don't want it to be white, I want it to be none. are you sure the resulting color in the pdf has value none? – Kaveh Sep 9 '15 at 19:36
    
Sorry, I don't know enough of the PDF format to know if bordercolor= means white or none at the end. What is none supposed to mean? Transparent? I don't know if that is supported. Maybe a true none is simply to set the borderwidth=0pt like the other answer. It cab tested in a colored background. – alfC Sep 9 '15 at 19:45
    
@alfC, none is a value for color that pdf supports. Yes, the result is transparent (regarding width 0 see my comment below). – Kaveh Sep 9 '15 at 19:52

The standard way is probably to set borderwidth to zero so no border is added. (Leaving bordercolor the empty string doesn't seem to be a supported value as far as I can see, even though it may not give an error message)

\documentclass[12pt]{article}
\usepackage{hyperref}
\usepackage{xcolor}

\begin{document}

\begin{Form}
\TextField[name=formname,borderwidth=0pt,,width=6cm] {\mbox{}}
\end{Form}

\end{document}
share|improve this answer
    
Thanks, I thought of this, but this won't work with other parameters like backgroundcolor which I want to set to none. Since PDF files support a none/no color value for these parameters the main point is how to access them from hyperref and leaving the value empty seems to do exactl that. hyperref package is not well-documented AFAIU. – Kaveh Dec 6 '13 at 22:42
    
How do we apply this solution to all the elements? – 71GA Aug 26 '14 at 23:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.