PDF import not working while importing a Adobe signed pdf

1 Answer 296 Views
PdfProcessing
Harinath
Top achievements
Rank 1
Harinath asked on 10 Dec 2021, 07:49 AM

  RadFixedDocument doc = new PdfFormatProvider().Import(System.IO.File.OpenRead(localPdfFile));

I am trying to load a Adobe signed PDF document , but is throwing error as "The input data is not a complete block"

 

System.Security.Cryptography.CryptographicException
  HResult=0x80131430
  Message=The input data is not a complete block.
  Source=System.Core
  StackTrace:
   at System.Security.Cryptography.CapiSymmetricAlgorithm.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
   at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at System.IO.Stream.Dispose()
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Encryption.StandardEncrypt.CalculateAesResult(Byte[] cipherTextCombined, Byte[] key)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Encryption.StandardEncrypt.Encrypt(StandardEncryptionContext context)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Encryption.StandardEncrypt.EncryptString(Int32 objectNo, Int32 generationNo, Byte[] data)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Encryption.StandardEncrypt.DecryptString(Int32 objectNo, Int32 generationNo, Byte[] data)

 

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 13 Dec 2021, 09:44 AM

Hello Harinath,

It seems this exception is related to a known issue that we have already logged in our backlog: PdfProcessing: CryptographicException is thrown when saving with PdfStreamWriter or importing with PdfFormatProvider.

I am afraid I cannot provide you with a workaround until this issue is fixed, so please, make sure to subscribe to the task by clicking the Follow button so you can receive updates when its status changes.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
PdfProcessing
Asked by
Harinath
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or