Closed kumarandena closed 5 years ago
ownerPassword
is required,
Set only ownerPassword
and not userPassword
.
Example:
var dd = {
ownerPassword: '123456',
permissions: {
printing: 'highResolution',
modifying: false,
copying: false,
annotating: true,
fillingForms: true,
contentAccessibility: true,
documentAssembly: true
},
content: [
'With user password',
'Another paragraph, this time a little bit longer to make sure, this line will be divided into at least two lines',
{
image: 'sampleImage.jpg',
fit: [100, 100]
},
]
}
@liborm85 I didn't noticed that. Setting only ownerPassword
did the trick!
Thanks.
Hi,
My need is to prevent copying contents from generated pdf.
Issue - I set the permissions object with all settings. Still we can copy the text contents from pdf, If the user/owner password is not set while pdf creation.
Expected - I need to prevent copying contents(Text, Image, ..all) from the pdf but I don't need to set user password at all.
Test Results (Focused only on copying permission):
}
var dd = { userPassword: '123', ownerPassword: '123456', permissions: { printing: 'highResolution', modifying: false, copying: false, annotating: true, fillingForms: true, contentAccessibility: true, documentAssembly: true }, content: [ 'With user password', 'Another paragraph, this time a little bit longer to make sure, this line will be divided into at least two lines', { image: 'sampleImage.jpg', fit: [100, 100] }, ]
}