Исходный код вики PDF Office template

Версия 3.1 от Alexey Semenihin на 16.04.2025, 14:51

Последние авторы
1 {{velocity}}
2 #set($attachments = $doc.getAttachmentList())
3 #foreach($attachment in $attachments)
4 #set($filename = $attachment.filename)
5 #set($fileurl = $doc.getAttachmentURL($filename))
6
7 #if($filename.toLowerCase().endsWith('.pdf'))
8 ===Документ: ${attachment.filename}===
9 {{html}}
10 <iframe
11 src="/resources/pdfjs/web/viewer.html?file=${fileurl}"
12 width="100%"
13 height="600px">
14 </iframe>
15 {{/html}}
16
17 #end
18 #if(!$filename.toLowerCase().endsWith('.pdf'))
19
20 ===Документ: ${attachment.filename}===
21
22 {{office attachment="${attachment.filename}" filterStyles="false"/}}
23
24 #end
25 #end
26 {{html}}
27 <style>
28 .pdf-viewer-container {
29 margin: 20px 0;
30 border: 1px solid #eee;
31 padding: 10px;
32 background: #f9f9f9;
33 }
34 </style>
35 {{/html}}
36 {{/velocity}}