Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Mar 12, 2024 2:55 am

Hi Team..

we recently encountered an unusual occurrence. Normally, when attempting to load a password-protected PDF an error will be triggered, and we will catch this error and informing users of the password protection. However, we have tested a file that loads without requiring a password. Yet, when viewed through Adobe/Chrome/Edge browser, it prompts for a password as usual.

The spire pdf version that we are using is 8.1.8.13040. We would appreciate your input on the possible causes of this issue and is there a way for us to investigate further?

xiao0207
 
Posts: 45
Joined: Thu Dec 13, 2018 9:50 am

Tue Mar 12, 2024 5:52 am

Hello,

Thanks for your inquiry.
Sorry, based on your description, we are unable to determine the cause of your issue. For the convenience of our further investigation, please send your PDF file and test code to this post or to this email: [email protected]. Thank you in advance.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 732
Joined: Mon Dec 27, 2021 2:23 am

Tue Mar 12, 2024 7:40 am

Hi William.Zhang

I have sent you the test file via email, and below is my code:

Code: Select all
try{
   PdfDocument pdffile = new PdfDocument();
   pdffile.LoadFromFile(file);
        //password protected file should trigger the error here

   var pageNumber = pdffile.Pages.Count;
   for (int i = fromPage; i < pageNumber && i <= untilPage; i++)
   {   
      Image images = pdffile.SaveAsImage(i, Spire.Pdf.Graphics.PdfImageType.Bitmap, res, res);
      ...      
   }
}catch (Exception ex)
{
   //password protected file will catch error here
}

xiao0207
 
Posts: 45
Joined: Thu Dec 13, 2018 9:50 am

Tue Mar 12, 2024 8:03 am

Hello,

Thanks for more information.
Yes,I did reproduce the issue you mentioned. I have logged the issue into our bug tracking system with the ticket number SPIREPDF-6598. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 732
Joined: Mon Dec 27, 2021 2:23 am

Tue Apr 16, 2024 1:43 am

Hello,

Thank you for your patience.
The latest version of Spire.PDF Pack(Hot Fix) Version:10.4.2 has already fixed the issue SPIREPDF-6598. Please update and test it.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/10.4.2

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 732
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.PDF

cron