Bug 155042 - Cannot open password protected pdf files in Libreoffice
Summary: Cannot open password protected pdf files in Libreoffice
Status: RESOLVED DUPLICATE of bug 55425
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) release
Hardware: All All
: medium minor
Assignee: Not Assigned
Keywords: filter:pdf
: 158088 (view as bug list)
Depends on:
Blocks: PDF-Import-Draw Password-Protected
  Show dependency treegraph
Reported: 2023-04-27 08:50 UTC by Jenny
Modified: 2023-11-24 15:55 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Password protected pdf file (659.39 KB, application/pdf)
2023-04-27 08:51 UTC, Jenny

Note You need to log in before you can comment on or make changes to this bug.
Description Jenny 2023-04-27 08:50:14 UTC
Hi, when I try to open a pdf file which is password protected, I get the following error message 'Version Incompatibility. Incorrect file version'.
It seems to open pdf files which are not password protected.
So I am using Adobe to open these files for now.

Steps to Reproduce:
1.Open the attached pdf file

Actual Results:
Error message 'Version Incompatibility. Incorrect file version'.

Expected Results:
Request the password.
After input by user of the password, it should open the pdf file.

Reproducible: Sometimes

User Profile Reset: Yes

Additional Info:
Version: (X86_64) / LibreOffice Community
Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2
CPU threads: 2; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-ZA (en_ZA); UI: en-US
Calc: threaded
Comment 1 Jenny 2023-04-27 08:51:51 UTC
Created attachment 186955 [details]
Password protected pdf file
Comment 2 Robert Großkopf 2023-04-27 09:48:26 UTC
Could confirm the buggy behavior with LO on OpenSUSE 15.4 64bit rpm Linux.

Note: It is a little bit tricky to download a password protected *.pdf. You have to use right mouse click and then menue → download.
Comment 3 Julien Nabet 2023-04-27 09:51:29 UTC
Just for the record, the pdf file you attached uses the algorithm version 4, LO knows only how to deal with algo 1 and 2 so for the moment, your only choice is indeed to use something else than LO to open your pdf file.
Comment 4 Julien Nabet 2023-04-27 09:59:54 UTC
Code pointer (for devs): https://opengrok.libreoffice.org/xref/core/sdext/source/pdfimport/pdfparse/pdfentries.cxx?r=f24d38de#1210
pdf specs: https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf
(Optional) A code specifying the algorithm to be used in encrypting and
decrypting the document:
0 An algorithm that is undocumented. This value shall not be used.
1 "Algorithm 1: Encryption of data using the RC4 or AES algorithms" in 7.6.2,
"General Encryption Algorithm," with an encryption key length of 40 bits; see
2 (PDF 1.4) "Algorithm 1: Encryption of data using the RC4 or AES algorithms"
in 7.6.2, "General Encryption Algorithm," but permitting encryption key lengths
greater than 40 bits.
3 (PDF 1.4) An unpublished algorithm that permits encryption key lengths
ranging from 40 to 128 bits. This value shall not appear in a conforming PDF
4 (PDF 1.5) The security handler defines the use of encryption and decryption
in the document, using the rules specified by the CF, StmF, and StrF entries.
The default value if this entry is omitted shall be 0, but when present should be a
value of 1 or greater.
Comment 5 Stéphane Guillou (stragu) 2023-11-21 08:12:36 UTC
*** Bug 158088 has been marked as a duplicate of this bug. ***
Comment 6 Timur 2023-11-24 15:55:11 UTC
Seeems duplicate.

*** This bug has been marked as a duplicate of bug 55425 ***