0
edits
Changes
Created page with ' ==Number of Pages ==Encrypted== If an uploaded PDF file is encrypted it will not be possible to attach it to a Web Page View using ssattach. * Attempting to attach…'
==Number of Pages
==Encrypted==
If an uploaded PDF file is encrypted it will not be possible to attach it to a [[Web Page View]] using [[ssattach]].
* Attempting to attach an encrypted PDF will not prevent the Web Page View from being converted to PDF. The encrypted file will simply be excluded from the resulting PDF document.
* Note: when inserting multiple PDFs into the centre of a Web Page View: If you are using the numofpages attribute to calculate the page location to '''insert''' a PDF into a Web Page View, any preceding documents that are excluded because they are encrypted will still be included in the page count so will disrupt the sequence of subsequent PDF insertions.
===Single File Custom Field===
* For a PDF uploaded to a [[Single File]] field the following script will trigger an alert indicating that the file should be replaced. The alert will appear after the page is saved.
* '''Note:''' It is not possible to trigger an alert as soon as the file is uploaded, only when the page reloads after the record is saved.
<pre>
function onloadfunc(){
if("@Applicant CV.[encrypted]@"=="Yes")
alert("The PDF version of the applicant CV is encrypted and cannot be attached to the application. The file must be replaced with a PDF that does not have the 'Content Copying' restriction in place.");
}
</pre>
===Multiple Files Custom Field===
* PDFs stored in [[Multiple Files]] fields cannot be automatically evaluated for the '''encrypted''' attribute. The encrypted attribute can be included as a column on the list view by adding the following to the '''Extra Columns''' field on the Multiple Files custom field settings:
::''Pages,Is Encrypted::numofpages,encrypted''
The multiple file field will then display as follows, and the user can visually ensure the files are not encrypted.
:[[File:MultiPDFencrypted.png]]
==See Also==
* [[Display Additional File Attributes for PDF Documents]]
[[Category:PDF]][[Category:JavaScript]]