Difference between revisions of "PDF Writer Custom Tags"
From SmartWiki
Line 13: | Line 13: | ||
::* next="even - odd" | ::* next="even - odd" | ||
::* pageCounter=pagenum | ::* pageCounter=pagenum | ||
− | * <pd4ml:page.header> </pd4ml:page.header>: Content between tags will be used as the page header (see Example below). Affects all subsequent pages (unless Scope option is defined) | + | * '''<pd4ml:page.header> </pd4ml:page.header>''': Content between tags will be used as the page header (see Example below). Affects all subsequent pages (unless Scope option is defined) |
:Options: | :Options: | ||
::* scope="scope": explicitely predefines pages, where the header should appear. Example: scope="odd,5,15-25,45+,skiplast" | ::* scope="scope": explicitely predefines pages, where the header should appear. Example: scope="odd,5,15-25,45+,skiplast" | ||
Line 20: | Line 20: | ||
::* style="associated style info" | ::* style="associated style info" | ||
::* $[page], $[total] and $[title]: inserts | ::* $[page], $[total] and $[title]: inserts | ||
− | * <pd4ml:page.footer> first page footer. page $[page] of $[total]</pd4ml:page.footer>: Content between tags will be used as the page footer (see Example below). Affects all subsequent pages (unless Scope option is defined) | + | * '''<pd4ml:page.footer>''' first page footer. page $[page] of $[total]</pd4ml:page.footer>: Content between tags will be used as the page footer (see Example below). Affects all subsequent pages (unless Scope option is defined) |
:Options: same as pd4ml:page.header tag. | :Options: same as pd4ml:page.header tag. | ||
* '''<pd4ml:toc>''': table of contents. | * '''<pd4ml:toc>''': table of contents. | ||
:Options: | :Options: | ||
::* pncorr="number": a correction value to add to page numbers | ::* pncorr="number": a correction value to add to page numbers | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Examples== | ==Examples== | ||
+ | * The following will define HTML can be added to a [[Web Page View]] document to be used as the page header and footer. A different header is defined for the first page using the '''scope''' option. | ||
+ | :Only the header for the first page will be displayed in the [[Web Page View]] HTML view. The header for subsequent pages and the page footer are hidden using '''<div style="display:none;pd4ml-display:block">''' | ||
+ | |||
+ | <pre> | ||
+ | <pd4ml:page.header scope="1"> | ||
+ | <div style="margin-top: 30px;margin-left:30px;margin-right:30px;margin-bottom:30px"><img src="/files/12345/f51222/HeaderImage.jpg" width="250px"></div> | ||
+ | </pd4ml:page.header> | ||
+ | <div style="display:none;pd4ml-display:block"> | ||
+ | <pd4ml:page.header scope="2+"> | ||
+ | <div style="margin-top: 30px;margin-left:30px;margin-right:30px;margin-bottom:30px"><table width="100%"><tr><td><img src="/files/12345/f51222/HeaderImage.jpg" width="250px"></td><td style="text-align:right">page $[page] of $[total]</td></tr></table></div> | ||
+ | </pd4ml:page.header> | ||
+ | <pd4ml:page.footer> | ||
+ | <div style="margin-top:30px;margin-left:30px;margin-right:30px;margin-bottom:30px"> | ||
+ | <table width="100%"> | ||
+ | <tr><td><img src="/files/12345/f51221/FooterImage.jpg" width="75px"></td> | ||
+ | <td style="text-align:right"><span style='font-size:9.0pt;line-height:115%;font-family:"Verdana","sans-serif";color:gray'>SmartSimple Software >></span><span style='font-family:"Arial Black","sans-serif";color:#008386'> <link>www.smartsimple.com</link></span> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table></div> | ||
+ | </pd4ml:page.footer> | ||
+ | </div> | ||
+ | </pre> | ||
Line 40: | Line 56: | ||
* [http://pd4ml.com/html.htm http://pd4ml.com/html.htm] (external website) | * [http://pd4ml.com/html.htm http://pd4ml.com/html.htm] (external website) | ||
− | [[Category:PDF] | + | [[Category:PDF]] |
Revision as of 13:32, 19 January 2011
The following custom tags can be included in Web Page Views to manipulate the output when converting to PDF:
List of Custom Tags
- <pd4ml-display:none>: content between these tags will not be included in the PDF.
- <pd4ml:page.break>: inserts a page break at this location
- Options:
- ifSpaceBelowLessThan= pixels: allows to suppress the page break if the available space on the current page is more than the specified value.
- htmlWidth=pixels: forces PD4ML to change current htmlWidth (screenWidth) value and to affect HTML-to-PDF scaling factor. “reset” returns htmlWidth to the initial state.
- htmlWidth="reset"
- pageFormat="rotate"
- pageFormat="WxH"
- pageFormat="reset"
- next="even - odd"
- pageCounter=pagenum
- <pd4ml:page.header> </pd4ml:page.header>: Content between tags will be used as the page header (see Example below). Affects all subsequent pages (unless Scope option is defined)
- Options:
- scope="scope": explicitely predefines pages, where the header should appear. Example: scope="odd,5,15-25,45+,skiplast"
- height="height"
- width="width"
- style="associated style info"
- $[page], $[total] and $[title]: inserts
- <pd4ml:page.footer> first page footer. page $[page] of $[total]</pd4ml:page.footer>: Content between tags will be used as the page footer (see Example below). Affects all subsequent pages (unless Scope option is defined)
- Options: same as pd4ml:page.header tag.
- <pd4ml:toc>: table of contents.
- Options:
- pncorr="number": a correction value to add to page numbers
Examples
- The following will define HTML can be added to a Web Page View document to be used as the page header and footer. A different header is defined for the first page using the scope option.
- Only the header for the first page will be displayed in the Web Page View HTML view. The header for subsequent pages and the page footer are hidden using <div style="display:none;pd4ml-display:block">
<pd4ml:page.header scope="1"> <div style="margin-top: 30px;margin-left:30px;margin-right:30px;margin-bottom:30px"><img src="/files/12345/f51222/HeaderImage.jpg" width="250px"></div> </pd4ml:page.header> <div style="display:none;pd4ml-display:block"> <pd4ml:page.header scope="2+"> <div style="margin-top: 30px;margin-left:30px;margin-right:30px;margin-bottom:30px"><table width="100%"><tr><td><img src="/files/12345/f51222/HeaderImage.jpg" width="250px"></td><td style="text-align:right">page $[page] of $[total]</td></tr></table></div> </pd4ml:page.header> <pd4ml:page.footer> <div style="margin-top:30px;margin-left:30px;margin-right:30px;margin-bottom:30px"> <table width="100%"> <tr><td><img src="/files/12345/f51221/FooterImage.jpg" width="75px"></td> <td style="text-align:right"><span style='font-size:9.0pt;line-height:115%;font-family:"Verdana","sans-serif";color:gray'>SmartSimple Software >></span><span style='font-family:"Arial Black","sans-serif";color:#008386'> <link>www.smartsimple.com</link></span> </td> </tr> </table></div> </pd4ml:page.footer> </div>
See Also
- http://pd4ml.com/html.htm (external website)