Bản mẫu:Pdf/doc
Đây là một trang con tài liệu sử dụng bản mẫu dành cho Bản mẫu:Pdf. Nó gồm có các thông tin hướng dẫn sử dụng, thể loại và các nội dung khác không thuộc về phần trang bản mẫu gốc. |
{{Pdf/doc}} lưu ý rõ hơn một liên kết tới tài liệu định dạng PDF. Trong một số hệ thống, người ta thường thấy mất thời gian để tải xuống và mở trong các trình duyệt, và việc sử dụng chúng trong nhiều website có thể không tương thích với Hướng dẫn khả năng tiếp cận và sử dụng nội dung thông tin của trang thông tin điện tử. Vì thế cần có cách lưu ý này.
Cách sử dụng
sửaĐoạn mã sau:
{{PDFlink|[http://www.example.org/Link.pdf Link]}} {{PDFlink|[http://www.example.org/Link.pdf Link]|32 KB}}
sẽ cho:
Lưu ý: Trước đây, bạn có thể thêm biểu tượng chỉ cần với {{PDFlink}}
, nhưng giờ tính năng đã thay đổi, khiến cho điều đó không thể tiến hành được với Internet Explorer. Vì thế, nếu bạn sử dụng Internet Explorer, hãy sử dụng bản mẫu phía trên.
PDFbot
sửaAn unassisted bot (User:PDFbot) has been created to add and keep file size information current. In addition, it will fix many mistakes and the limitation as described in the section below.
Note: the bot will replace the contents of the second parameter when updating the file size.
Icon
sửaThe icon is add using CSS and is found in MediaWiki:Common.css, the relevant portion that applies the icon is:
/* Change the external link icon to an Adobe icon anywhere the PDFlink class */
/* is used (notably Template:PDFlink). This works in IE5-6, unlike the above. */
span.PDFlink a {
background: url(http://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Icons-mini-file_acrobat.gif/15px-Icons-mini-file_acrobat.gif) center right no-repeat !important;
padding-right: 17px !important;
}
Limitations
sửaAs this template uses unnamed parameters, links containing = or | will cause the link to not display at all. The workaround is to either replace the entity with an indirect character reference as =
and |
, respectively, or to use the numbered parameter (1=
and 2=
) for each parameter to take care of =, or to use {{!}} to take care of |.
Examples:
- {{PDFlink|[http://example.org/bla?a=xy|Link.pdf Link to a PDF]|32 KB}}
- 32 KBPDF
- {{PDFlink|[http://example.org/bla?a=xy|Link.pdf Link to a PDF]|32 KB}}
- Link to a PDFPDF (32 KB)
- {{PDFlink|1=[http://example.org/bla?a=xy{{!}}Link.pdf Link to a PDF]|2=32 KB}}
- Link to a PDFPDF (32 KB)