mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-13 11:09:06 +00:00
QL will display a UI prompting for a password. Upon entering the correct password, the PDF file will be reopened.
This commit is contained in:
@@ -23,12 +23,12 @@ namespace QuickLook.Plugin.PDFViewer;
|
||||
|
||||
public class PdfDocumentWrapper : IDisposable
|
||||
{
|
||||
public PdfDocumentWrapper(Stream stream)
|
||||
public PdfDocumentWrapper(Stream stream, string password = null)
|
||||
{
|
||||
PdfStream = new MemoryStream((int)stream.Length);
|
||||
stream.CopyTo(PdfStream);
|
||||
|
||||
PdfDocument = PdfDocument.Load(PdfStream);
|
||||
PdfDocument = PdfDocument.Load(PdfStream, password);
|
||||
}
|
||||
|
||||
public PdfDocument PdfDocument { get; private set; }
|
||||
|
Reference in New Issue
Block a user