Difference between revisions of "Display Additional File Attributes for PDF Documents"

From SmartWiki
Jump to: navigation, search
(See Also)
(Multiple File Fields)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
* This feature allows you to display extra information (called Meta Data) extracted from PDF files that are stored in [[Custom Field Type: Link – Single File|Single File]] or [[Custom Field Type: Link – Multiple Files|Multiple Files]] field.
+
* This feature allows you to display extra information (called Meta Data) extracted from PDF files that are stored in [[Custom Field Type: Upload - Single File Storage|Single File]] or [[Custom Field Type: Upload - Multiple Files Storage|Multiple Files]] field.
 
* Only PDF files will display this information.
 
* Only PDF files will display this information.
* The additional attributes that can be extracted and displayed are:  
+
* The additional attributes that can be extracted and displayed are:
:{| border="1"
+
 
 +
{| class="wikitable"
 
|-
 
|-
|'''Meta Data Field Name'''
+
||'''Meta Data Field Name'''
|'''Field Code'''
+
||'''Field Code'''
 
|-
 
|-
|Author
+
||Author
|author
+
||author
 
|-
 
|-
|Creator
+
||Creator
|creator
+
||creator
 
|-
 
|-
|Producer
+
||Producer
|producer
+
||producer
 
|-
 
|-
|Keywords
+
||Keywords
|keywords
+
||keywords
 
|-
 
|-
|Subject
+
||Subject
|subject
+
||subject
 
|-
 
|-
|Title
+
||Title
|title
+
||title
 
|-
 
|-
|Number of Pages
+
||Number of Pages
|numofpages
+
||numofpages
 
|-
 
|-
|Creation Date
+
||Creation Date
|creationdate
+
||creationdate
 
|-
 
|-
|Modified Date
+
||Modified Date
|modifieddate
+
||modifieddate
 
|-
 
|-
|Is Encrypted
+
||Is Encrypted
|encrypted
+
||encrypted
 
|}
 
|}
 
 
  ''Is Encrypted'': Returns the word '''Encrypted''' if the document has the '''"Content Copying"''' or '''"Content Copying or Extraction"'''  
 
  ''Is Encrypted'': Returns the word '''Encrypted''' if the document has the '''"Content Copying"''' or '''"Content Copying or Extraction"'''  
 
  security restriction is in place.  
 
  security restriction is in place.  
 +
PDFs that are encrypted cannot be merged with a Web Page View (see [[Attach a PDF to a Web Page View]])
  
 
There are two different ways of displaying additional file attributes for PDF documents, depending on whether the PDF document(s) are stored in a [[Custom Field Type: Link – Single File|Single File]] field or [[Custom Field Type: Link – Multiple Files|Multiple Files]] field.
 
There are two different ways of displaying additional file attributes for PDF documents, depending on whether the PDF document(s) are stored in a [[Custom Field Type: Link – Single File|Single File]] field or [[Custom Field Type: Link – Multiple Files|Multiple Files]] field.
  
 
==Single File Fields==
 
==Single File Fields==
* In order to extract Meta Data related to a PDF file stored in a [[Custom Field Type: Link – Single File|Single File]] field you must create a [[Custom Field Type: Read Only – System Variables|Read Only - System Variables]] or [[Custom Field Type: Store Values – System Variables|Store Values - System Variables]] field to display the additional attributes.
+
* In order to extract Meta Data related to a PDF file stored in a [[Custom Field Type: Upload - Single File Storage|Single File]] field you must create a [[Custom Field Type: Read Only – System Variables|Read Only - System Variables]] or [[Custom Field Type: Store Values – System Variables|Store Values - System Variables]] field to display the additional attributes.
 
* In the '''Variables''' section of the [[Custom Field Type: Read Only – System Variables|Read Only]] or [[Custom Field Type: Store Values – System Variables|Store Value]] field use the following syntax:
 
* In the '''Variables''' section of the [[Custom Field Type: Read Only – System Variables|Read Only]] or [[Custom Field Type: Store Values – System Variables|Store Value]] field use the following syntax:
  
Line 50: Line 51:
 
  ''Label'' '''[field code]'''  
 
  ''Label'' '''[field code]'''  
 
  @
 
  @
* Where ''Field Name'' is that name of the [[Custom Field Type: Link – Single File|Single File]] field that contains the PDF document.
+
* Where ''Field Name'' is that name of the [[Custom Field Type: Upload - Single File Storage|Single File]] field that contains the PDF document.
 
* You can use html to format the output:
 
* You can use html to format the output:
  
:[[Image:PDFDetails.PNG|link=]]
+
: [[Image:PDFDetails.PNG|link=]]
 
* In the above example '''Contract Document''' is the name of the [[Custom Field Type: Link – Single File|Single File]] field that contains the PDF document.
 
* In the above example '''Contract Document''' is the name of the [[Custom Field Type: Link – Single File|Single File]] field that contains the PDF document.
 
* The [[Custom Field Type: Read Only – System Variables|Read Only - System Variables]] field will display:
 
* The [[Custom Field Type: Read Only – System Variables|Read Only - System Variables]] field will display:
:[[Image:PDFDetails2.PNG|link=]]
 
  
 +
: [[Image:PDFDetails2.PNG|link=]]
 +
'''Note''': if you wish to use the value (ie: ''numofpages'') as part of [[Submit Logic]] or a [[Browser Script]] you must use a [[Custom Field Type: Store Values – System Variables|Store Values - System Variables]] field type.
  
'''Note''': if you wish to use the value (ie: ''numofpages'') as part of [[Submit Logic]] or a [[Browser Script]] you must use a [[Custom Field Type: Store Values – System Variables|Store Values - System Variables]] field type.
 
 
  @''fieldname''.numofpages@  
 
  @''fieldname''.numofpages@  
::or
+
:: or
 
  @#''fieldid''.numofpages#@
 
  @#''fieldid''.numofpages#@
 
  
 
Some techniques on validating PDF file attributes such as the number of pages are described in [[Validating File Attributes]].
 
Some techniques on validating PDF file attributes such as the number of pages are described in [[Validating File Attributes]].
  
 
==Multiple File Fields==
 
==Multiple File Fields==
+
* To include the above attributes in the list view of documents stored in a [[Custom Field Type: Upload - Multiple Files Storage|Multiple Files]] field use the '''Extra Columns''' section when you create the [[Custom Field Type: Upload - Multiple Files Storage|Multiple Files]] field:
* To include the above attributes in the list view of documents stored in a [[Custom Field Type: Link – Multiple Files|Multiple Files]] field use the '''Extra Columns''' section when you create the [[Custom Field Type: Link – Multiple Files|Multiple Files]] field:
+
 
 
[[Image:PDFExtraColumns.PNG|link=]]
 
[[Image:PDFExtraColumns.PNG|link=]]
 +
 
* In the '''Extra Columns''' field enter the desired column headings (separated by commas), followed by two colons, followed by the field codes from above (again separated by commas)
 
* In the '''Extra Columns''' field enter the desired column headings (separated by commas), followed by two colons, followed by the field codes from above (again separated by commas)
 
* '''Note''': be sure there are no spaces between the field codes, just a comma.
 
* '''Note''': be sure there are no spaces between the field codes, just a comma.
 
* These attributes will only be displayed for PDF documents. They will be left blank for all non-PDF documents.
 
* These attributes will only be displayed for PDF documents. They will be left blank for all non-PDF documents.
 
[[Image:PDFDetails3.PNG|link=]]
 
[[Image:PDFDetails3.PNG|link=]]
 +
 +
===Pull an upload date and time from an upload fields===
 +
For Multiple Files Storage field you can use the below syntax:
 +
 +
<pre>@FIELD_NAME.template[#~uploaddate~#]@
 +
</pre>
  
 
==Notes==
 
==Notes==
 
* These additional fields are embedded properties of the file. Accordingly the ''Modified Date'' and ''Creation Date'' will be displayed in the format in which they are stored in the file, and will not necessarily reflect the format you have selected for Date and Time display in your [[Personal Settings]].
 
* These additional fields are embedded properties of the file. Accordingly the ''Modified Date'' and ''Creation Date'' will be displayed in the format in which they are stored in the file, and will not necessarily reflect the format you have selected for Date and Time display in your [[Personal Settings]].
 +
  
  

Latest revision as of 03:36, 21 April 2023

  • This feature allows you to display extra information (called Meta Data) extracted from PDF files that are stored in Single File or Multiple Files field.
  • Only PDF files will display this information.
  • The additional attributes that can be extracted and displayed are:
Meta Data Field Name Field Code
Author author
Creator creator
Producer producer
Keywords keywords
Subject subject
Title title
Number of Pages numofpages
Creation Date creationdate
Modified Date modifieddate
Is Encrypted encrypted
Is Encrypted: Returns the word Encrypted if the document has the "Content Copying" or "Content Copying or Extraction" 
security restriction is in place. 
PDFs that are encrypted cannot be merged with a Web Page View (see Attach a PDF to a Web Page View)

There are two different ways of displaying additional file attributes for PDF documents, depending on whether the PDF document(s) are stored in a Single File field or Multiple Files field.

Single File Fields

@Field Name. 
Label [field code] 
@
  • Where Field Name is that name of the Single File field that contains the PDF document.
  • You can use html to format the output:
PDFDetails.PNG
PDFDetails2.PNG

Note: if you wish to use the value (ie: numofpages) as part of Submit Logic or a Browser Script you must use a Store Values - System Variables field type.

@fieldname.numofpages@ 
or
@#fieldid.numofpages#@

Some techniques on validating PDF file attributes such as the number of pages are described in Validating File Attributes.

Multiple File Fields

  • To include the above attributes in the list view of documents stored in a Multiple Files field use the Extra Columns section when you create the Multiple Files field:

PDFExtraColumns.PNG

  • In the Extra Columns field enter the desired column headings (separated by commas), followed by two colons, followed by the field codes from above (again separated by commas)
  • Note: be sure there are no spaces between the field codes, just a comma.
  • These attributes will only be displayed for PDF documents. They will be left blank for all non-PDF documents.

PDFDetails3.PNG

Pull an upload date and time from an upload fields

For Multiple Files Storage field you can use the below syntax:

@FIELD_NAME.template[#~uploaddate~#]@

Notes

  • These additional fields are embedded properties of the file. Accordingly the Modified Date and Creation Date will be displayed in the format in which they are stored in the file, and will not necessarily reflect the format you have selected for Date and Time display in your Personal Settings.


See Also