From d1ca1cfec5d2af4ec93690d1dd103afaba4af693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mester=20Pirttij=C3=A4rvi?= Date: Sun, 19 Sep 2021 14:09:56 +0200 Subject: [PATCH] Updated XML documentation. --- src/PdfToSvg/IO/StreamExtensions.cs | 3 +++ src/PdfToSvg/PdfDocument.cs | 6 ++++-- src/PdfToSvg/Security/SecurityHandler.cs | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/PdfToSvg/IO/StreamExtensions.cs b/src/PdfToSvg/IO/StreamExtensions.cs index fd05fa8..713e369 100644 --- a/src/PdfToSvg/IO/StreamExtensions.cs +++ b/src/PdfToSvg/IO/StreamExtensions.cs @@ -144,6 +144,7 @@ public static byte[] GetBufferOrArray(this MemoryStream stream) /// /// Writes all bytes from a specified buffer to the stream. /// + /// Target stream. /// Buffer whose content will be written to the stream. [MethodImpl(MethodInliningOptions.AggressiveInlining)] public static void Write(this Stream stream, byte[] buffer) @@ -155,7 +156,9 @@ public static void Write(this Stream stream, byte[] buffer) /// /// Asynchronously writes all bytes from a specified buffer to the stream. /// + /// Target stream. /// Buffer whose content will be written to the stream. + /// Token for monitoring cancellation requests. [MethodImpl(MethodInliningOptions.AggressiveInlining)] public static Task WriteAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) { diff --git a/src/PdfToSvg/PdfDocument.cs b/src/PdfToSvg/PdfDocument.cs index 23ab318..5b8e0d6 100644 --- a/src/PdfToSvg/PdfDocument.cs +++ b/src/PdfToSvg/PdfDocument.cs @@ -75,7 +75,8 @@ internal PdfDocument(InputFile file, PdfDictionary? trailer, DocumentPermissions /// for the specified stream. /// is not readable and/or seekable. /// is null. - /// The PDF file is encrypted. Encrypted PDFs are currently not supported. + /// The input PDF is encrypted, but an incorrect password was specified, or not specified at all. + /// The input PDF could not be parsed. public static PdfDocument Open(Stream stream, bool leaveOpen = false, OpenOptions? options = null, CancellationToken cancellationToken = default) { if (stream == null) throw new ArgumentNullException(nameof(stream)); @@ -95,7 +96,8 @@ public static PdfDocument Open(Stream stream, bool leaveOpen = false, OpenOption /// is empty. /// An IO error occured while reading the file. /// No file was found at . - /// The PDF file is encrypted. Encrypted PDFs are currently not supported. + /// The input PDF is encrypted, but an incorrect password was specified, or not specified at all. + /// The input PDF could not be parsed. public static PdfDocument Open(string path, OpenOptions? options = null, CancellationToken cancellationToken = default) { if (path == null) throw new ArgumentNullException(nameof(path)); diff --git a/src/PdfToSvg/Security/SecurityHandler.cs b/src/PdfToSvg/Security/SecurityHandler.cs index b2225bd..087fa19 100644 --- a/src/PdfToSvg/Security/SecurityHandler.cs +++ b/src/PdfToSvg/Security/SecurityHandler.cs @@ -18,6 +18,7 @@ internal abstract class SecurityHandler /// /// Trailer dictionary before object inlining. /// Encryption dictionary. + /// Options passed to . public static SecurityHandler Create(PdfDictionary trailerDict, PdfDictionary encryptDict, OpenOptions options) { var securityHandler = encryptDict.GetValueOrDefault(Names.Filter, Names.Standard);