PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 11:11 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Mar 15, 2011 1:51 pm 
Offline

Joined: Tue Mar 15, 2011 1:39 pm
Posts: 3
Is there an easy way to set the security properties of a MigraDoc document. Currently I am creating a pdf by only using the MigraDoc library. How would I change the 'PdfSecuritySettings' (for example, PermitModifyDocument, etc.) of the document?

Many thanks


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 16, 2011 8:11 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
Do it as shown in this PDFsharp sample:
http://www.pdfsharp.net/wiki/ProtectDoc ... ample.ashx

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 18, 2011 7:18 pm 
Offline

Joined: Tue Mar 15, 2011 1:39 pm
Posts: 3
Many thanks for the reply. I had seen that example but I am using MigraDoc and not PDFsharp with a slight twist. The problem is that I'm serving the MigraDoc generated file in a stream to a browser so I need to be able to adjust the document properties in memory without loading it from a file using the PDFsharp library. I hope that explains it well enough.


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 20, 2011 9:43 am 
Offline

Joined: Tue Mar 15, 2011 1:39 pm
Posts: 3
Solved. I'm now rendering a Migradoc document to a PDFsharp surface (instead of directly to a stream) and then applying security settings, etc. before saving to a stream.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 128 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