MyWikiBiz, Author Your Legacy — Saturday September 06, 2025
Jump to navigationJump to search
2,903 bytes added
, 16:52, 7 December 2006
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
==Purpose==
Highlighting that a link points to a [[Portable Document Format|PDF]] document (on some systems PDF files may take time to download and display within the browser, and their use on many websites is not compliant with the [[Web Content Accessibility Guidelines]]).
== Usage ==
The following lines:
<!-- Does not work in Internet Explorer with new site-wide CSS-based icon. Please use the other forms <nowiki>[http://www.example.com/Link.pdf Link] {{PDFlink}}</nowiki> -->
<nowiki>{{PDFlink|[http://www.example.com/Link.pdf Link]}}</nowiki>
<nowiki>{{PDFlink|[http://www.example.com/Link.pdf Link]|32&nbsp;[[KiB]]}}</nowiki>
yield:
<!-- Does not work in Internet Explorer with new site-wide CSS-based icon. Please use the other forms :[http://www.example.com/Link.pdf Link] {{PDFlink}} -->
:{{PDFlink|[http://www.example.com/Link.pdf Link]}}
:{{PDFlink|[http://www.example.com/Link.pdf Link]|32 [[KiB]]}}
'''Note:''' It was previously possible to add the icon with <code><nowiki>{{PDFlink}}</nowiki></code> by itself, but the functionality has been changed and this no longer works in Internet Explorer. You must surround it with the template as shown above.
== Limitations ==
As the template uses [[m:Help:Templates#Restrictions_on_parameter_values|unnamed parameters]], links containing <tt>=</tt> or <tt>|</tt> will cause the link to not display at all. The two workarounds to this limitation are to replace the entity with an indirect [[Numeric character reference|character reference]] as <code>&#61;</code> and <code>&#124;</code>, respectively, or to use the numbered parameter (<code>1=</code> and <code>2=</code>) for each parameter.
Examples:
* <tt><nowiki>{{PDFlink|[http://www.com/bla?a=xy|Link.pdf Link to a PDF]|32KB}}</nowiki></tt>
** {{PDFlink|[http://www.com/bla?a=xy/Link.pdf Link to a PDF]|32KB}}
* <tt><nowiki>{{PDFlink|[http://www.com/bla?a</nowiki><span style="color: red;">'''&#61;'''</span>xy<span style="color: red;">'''&#124;'''</span>Link.pdf Link to a PDF]|32KB}}</tt>
** {{PDFlink|[http://www.com/bla?a=xy|Link.pdf Link to a PDF]|32KB}}
* <tt><nowiki>{{PDFlink|</nowiki>'''<span style="color: red;">1=</span>'''<nowiki>[http://www.com/bla?a=xy</nowiki><span style="color: red;">'''&#124;'''</span>Link.pdf Link to a PDF]|'''<span style="color: red;">2=</span>'''32KB}}</tt>
** {{PDFlink|1=[http://www.com/bla?a=xy|Link.pdf Link to a PDF]|2=32KB}}
== See also ==
* [[Template:DOClink]]
* [[Template:RTFlink]]
* [[Template:videolink]]
* [[Template:audiolink]]
<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:External link file type templates|{{PAGENAME}}]]
<!-- ADD INTERWIKIS BELOW THIS LINE -->
</includeonly>