Hi!
I have one encrypted file called "EncryptedFile.pdf" (attached) wich your password is 550.
Using the C# line code:
EncryptedFilePdfDocument.Security.Encrypt(String.Empty)
I save your decrypted version called "DecryptedFile.pdf" (attached too). I can open it in Chrome, for example, without problem.
When I try build a large PdfDocument using DecryptedFile like this:
PdfDocument FinalPDF= new PdfDocument();
for (Int32 Counter = 0; Counter < DecryptedFilePdfDocument.Pages.Count; Counter++)
{
FinalPDF.InsertPage(DecryptedFilePdfDocument, Counter);
}
I receive the error code:
Invalid contents array.
[PdfDocumentException: Invalid contents array.]
Spire.Pdf.PdfPageLayerCollection.ᜀ(PdfPageWidget A_0) +1208
Spire.Pdf.PdfPageLayerCollection..ctor(PdfPageBase page) +116
Spire.Pdf.PdfPageBase.get_PageLayers() +85
Spire.Pdf.PdfPageBase.() +84
Spire.Pdf.Widget.PdfPageCollection.ᜀ(PdfDocumentBase A_0, PdfPageBase A_1, List`1 A_2) +695
Spire.Pdf.PdfNewDocument.ClonePage(PdfDocumentBase ldDoc, PdfPageBase page, List`1 destinations) +40
Spire.Pdf.PdfDocumentBase.ImportPageRange(PdfDocumentBase ldDoc, Int32 startIndex, Int32 endIndex) +2068
Spire.Pdf.PdfDocumentBase.ImportPage(PdfDocumentBase ldDoc, Int32 pageIndex) +135
Spire.Pdf.PdfDocument.InsertPage(PdfDocument doc, Int32 pageIndex) +47
GEDArquivoDokks.GED.Arquivos.PastaArquivoDokks.GerarRelatorio(List`1 pListaDoCaminhoDoArquivoDokks) +452
GEDArquivoDokks.GEDDownloadArquivoDokks.DownloadPastaArquivoDokks(String pLoteDeIDsArquivoDokks) +653
GEDArquivoDokks.GEDDownloadArquivoDokks.Page_Load(Object sender, EventArgs e) +557
System.Web.UI.Control.OnLoad(EventArgs e) +103
System.Web.UI.Control.LoadRecursive() +68
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3811
This occur just when I use the drecypted file - with the others I don't have any problem.
(the Spire.Pdf.dll version is 5.4.9.2040)
Thanks for your attention.