Note: You are currently viewing documentation for Moodle 2.6. Up-to-date documentation for the latest stable version of Moodle may be available here: Datalynx PDF view.

Datalynx PDF view: Difference between revisions

From MoodleDocs
Line 53: Line 53:
For example:
For example:
<code>
<code>
<div><span style="color:#FF0000;">#TOC_DESCRIPTION#</span> ... <span>#TOC_PAGE_NUMBER#</span></div>
&lt;div>&lt;span style="color:#FF0000;">#TOC_DESCRIPTION#&lt;/span> ... &lt;span>#TOC_PAGE_NUMBER#&lt;/span>&lt;/div>
<div><span style="color:#00FF00;">#TOC_DESCRIPTION#</span> ... <span>#TOC_PAGE_NUMBER#</span></div>
&lt;div>&lt;span style="color:#00FF00;">#TOC_DESCRIPTION#&lt;/span> ... &lt;span>#TOC_PAGE_NUMBER#&lt;/span>&lt;/div>
</code>
</code>
By this simple template the pdf file will display the TOC with the first bookmark level in red and the second in green. Page numbers will be displayed separated from the bookmark descriptions by ellipsis.
By this simple template the pdf file will display the TOC with the first bookmark level in red and the second in green. Page numbers will be displayed separated from the bookmark descriptions by ellipsis.

Revision as of 18:54, 27 April 2014

Settings for a PDF view, that are only applicable for this specific view type.

PDF settings

The settings described below are used with the tag ##export:all## or ##export:page##. Usually you won't that users can directly access this view, but only download the PDF. To generate a download link from within an entry, this would be the pattern to use:

#{{viewlink:NameOfThePDFView;Text of the link to display;pdfexportentry=##entryid##|dest=D|docname=PDFName##author:firstname##-##author:lastname##;}}#

The above link will generate a download link with the entry id of the current entry, and the name of the author of the entry included in the filename of the PDF.

Document name

Name of the document. You should also be able to user placeholders like ##author:firstname## for the name.

Orientation

Choose landscape or portrait

Unit

  • millimeter
  • point
  • centimeter
  • inch

Format

  • Letter
  • A4

Destination

  • Send to browser
  • Download

PDF TOC (Table of Content)

Automatically generate a table of content based on the entries.

TOC Page

Page number (e.g. 1). The page where the TOC should be displayed. By default (page number empty or 0) the TOC is not displayed.

Page bookmarks can be added in the repeatd entry section with tags in the format: #@bookmark-type:bookmark-level:bookmark-text@#

Bookmark type: PDF-GBM for group bookmark, PDF-BM for regular bookmark. Group bookmarks display only the first occurence in a sequence of the same bookmark-text. Bookmark-level: 0 - n. If the html TOC template is used, it must contain a template definition for each bookmark level that is specified in the content. Bookmark-text: The text that will be displayed for the bookmark in the TOC. Field tags can be used to extract the text from the entry content.

Example: #@PDF-GBM:0:##author:name##@# #@PDF-BM:1:[[Date masked]]@#

TOC Name

Name for the table of content

TOC Title

Html for the TOC title that is displayed above the table of content. For example, <h1>TABLE OF CONTENT</h1> will display the TOC page with the title 'TABLE OF CONTENT' styled as heading1.

TOC Template

The TOC Template specifies the html for displaying the bookmarks in the table of content. The #TOC_DESCRIPTION# and #TOC_PAGE_NUMBER# must be enclosed in span tags.

For example: <div><span style="color:#FF0000;">#TOC_DESCRIPTION#</span> ... <span>#TOC_PAGE_NUMBER#</span></div> <div><span style="color:#00FF00;">#TOC_DESCRIPTION#</span> ... <span>#TOC_PAGE_NUMBER#</span></div> By this simple template the pdf file will display the TOC with the first bookmark level in red and the second in green. Page numbers will be displayed separated from the bookmark descriptions by ellipsis.

Leave empty to display a default non-html TOC.

PDF Frame

PDF Watermark

PDF Header

PDF Footer

PDF Margins and paging

PDF Protection

Digital Signature