Attach a PDF to a Web Page View
Note: The attached PDF file(s) will not be 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.
To attach a PDF file to the beginning or the end of the Web Page View:
- <!--@ssattach(position;pdf file location)-->
- position is either before or after.
- pdf file location is:
File Source Syntax Comments Smart Folder /files/folder1/folder2/File_Name.pdf To obtain select View URL from the File Options combo box next to the relevant file in the Smart Folder.
The first part of the URL should be omitted: the location specified should begin with "/files/..." as in the examples below.
Single File Custom Field @Custom Field Name.value@ Multiple Files Custom Field @Custom Field Name.files@ All PDF files stored in field will be attached.
- Single or Multiple file fields on parent/grandparent levels can also be included using:
- @parent.Custom Field Name.value@, @parent.parent.Custom Field Name.files@, etc.
- Append a PDF file from a Single File Custom Field called "AttachPDFFile" before the current Web Page View Field page:.
- Note: Don't forget to include .value
Where 123456 is the Custom Field ID
- Attach PDF files to a Level 1 Web Page View from the organization Custom Fields associated as the Customer on the Level 1 record:
Where UploadFieldName is the field name of the multi-file upload custom field on the organization record
- IMPORTANT Any PDF files that have security restriction in place such as Content Copying or Content Copying or Extraction have been encrypted and cannot be included.
- The settings can be viewed by opening the PDF and clicking File > Document Properties > Security (steps may vary depending on the version of your PDF reader)
- See also: Display Additional File Attributes for PDF Documents
- The ssattach function can be placed anywhere inside the Web Page View Field
- All PDF page settings will driven by the first PDF document file, whether it is a static file or one generated by SmartSimple
- Multiple PDF files can be attached from different sources by using multiple ssattach statements:
<!--@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>
- sslogic can be used if the PDF file(s) to be attached needs to be varied using conditional statements:
<!--@sslogic('@type@'='contact')--> <!--@ssattach(after;@parent.contract.value@)--> <!--@else--> <!--@ssattach(after;@parent.othercontract.value@)--> <!--@end-->
@client.[#(?object=transaction::criteria=typename="Transaction Name" and statusname="Submitted"::orderby=trsts desc) <!--@ssattach(after;$fieldname.value$)-->#]@
@client.[#(?object=transaction::criteria=typename="Audited Financial Statements" and statusname="Submitted"::orderby=trsts desc) <!--@ssattach(after;$Recent Audited Financial statements.value$)-->#]@