PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Jul 27, 2024 4:32 pm

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: 957
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: Bing [Bot], Google [Bot] and 83 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