PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Oct 10, 2024 7:41 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Jul 22, 2024 9:03 pm 
Offline

Joined: Thu Dec 07, 2023 4:09 am
Posts: 4
Hi there,

Currently the PDFs that I create are able to be edited which I want to avoid happening.

I was wondering if there was a way to make a PDF that is generated by PDFSharp readonly? I can see that there is a "IsReadOnly" property on a PdfDocument but I can't find any property to set it as readonly.

Thanks for any help


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 23, 2024 5:35 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 994
Location: CCAA
Hi!

Set "EffectiveSecurityHandler.Permissions" of your document. And don't forget to set an Owner password.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 24, 2024 2:19 am 
Offline

Joined: Thu Dec 07, 2023 4:09 am
Posts: 4
Thanks! That worked a treat


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group