Difference between revisions of "Attach a PDF to a Web Page View"
From SmartWiki
Line 26: | Line 26: | ||
− | * You can also control the format settings of the PDF that is output by using the following syntax. The PDF file referenced should be a blank one-page pdf file which has the format settings you wish your PDF document to have: | + | * You can also control the format settings of the PDF that is output by using the following syntax. The PDF file referenced should be a blank one-page pdf file which has the format settings you wish your PDF document to have. The [[Web Page View]] will be inserted onto this template: |
<pre> | <pre> | ||
<!--@ssattach(setting;/files/1234/123/myfile.pdf)--> | <!--@ssattach(setting;/files/1234/123/myfile.pdf)--> |
Revision as of 17:43, 3 December 2009
You can use the ssattach function to append one or more PDF documents stored in either a Single File Field or Smart Folder to a Web Page View Field.
The attached PDF file(s) will not not visible when viewing the web page in HTML mode, but will be appended when exported as a PDF, saved as a PDF, emailed as PDF or created by a Workflow as attachment.
Sample Codes
- Append a PDF file from a Smart Folder before the current Web Page View Field page:
<!--@ssattach(before;/files/1234/123/myfile.pdf )-->
- Append a PDF file from a Smart Folder after the current Web Page View Field page:
<!--@ssattach(after;/files/1234/123/myfile.pdf )-->
- Append a PDF file from a Single File Custom Field called "AttachPDFFile" before the current Web Page View Field page:.
<!--@ssattach(before;@AttachPDFFile.value@)-->
- Note: Don't forget to include .value
- You can also control the format settings of the PDF that is output by using the following syntax. The PDF file referenced should be a blank one-page pdf file which has the format settings you wish your PDF document to have. The Web Page View will be inserted onto this template:
<!--@ssattach(setting;/files/1234/123/myfile.pdf)-->
Rules
- The ssattach function can be placed anywhere inside the Web Page View Field
- Multiple files can be attached from different sources:
<!--@ssattach(before;/files/1234/123/myfileheader.pdf )--> <!--@ssattach(after;/files/1234/123/myfilefooter.pdf )--> <!--@ssattach(after;/files/1234/123/myfileappendix.pdf )--> <html><body> My Pdf file </body></html>
- All page settings will driven by first PDF document file, either it is a static file or generated by SmartSimple
SSlogic
- Using @customfield@ instead of smart folder file (like @parent.contract@)
- Use if sslogic like this:
<!--@sslogic('@type@'='contact')--> <!--@ssattach(after;@parent.contract.value@)--> <!--@else--> <!--@ssattach(after;@parent.othercontract.value@)--> <!--@end-->