Код: Выделить всё
We recently changed PDFs to an encrypted\Secure PDF (no password needed to open in adobe reader) and now get the error: PDFReader not opened with owner password.
Using iTextSharp.LGPLv2.Core 3.4.3 with .Net 6.0 / c#
Error
MemoryStream stream = new();
PdfCopyFields copy = new(stream);
foreach (LetterTemplate t in sourceFiles)
{
//This throws the error using an encrypted PDF.
copy.AddDocument(new PdfReader(t.Data)); // t.Data is a byte array.
}
которые я нашел предложенными в старых сообщениях, но эти свойства недоступны.
Есть ли новое свойство\метод, которое я могу использовать, которое заменило бы неэтичное чтение?
Подробнее здесь: https://stackoverflow.com/questions/783 ... lds-adddoc
Мобильная версия