Caution on how to remove password for PDF files via CubePDF

CubePDF is a virtual printer software that converts PDF files through the printing process of some applications, and it seems that there are cases where password-protected PDF files are opened with a PDF browser software and reconverted to PDF through CubePDF to remove the owner and user passwords.

The success of this method strongly depends on the behavior of the PDF browser software where the printing is executed. For example, when we opened a password-protected PDF file with Adobe Acrobat Reader DC 2021.011.20039 (64bit) in our development environment using the user password, and executed the CubePDF conversion process through the print command, we received the following error message.

CubePDF error message

This is a message indicating an unexpected error in the Ghostscript API. Furthermore, if we check C:\ProgramData\CubeSoft\CubePDF\Log\CubePdf.log, we can see the following log output, which indicates that the conversion failed because the original PDF file is password protected.

%%[ ProductName: GPL Ghostscript ]%%
This PostScript file was created from an encrypted PDF file.
Redistilling encrypted PDF is not permitted.
%%[ Error: undefined; OffendingCommand: eexec ]%%

When you open a password-protected PDF file and print it, whether or not you get the above error depends on whether or not the PDF browser that printed the file also sends the relevant information to the PostScript printer driver. In addition, considering the fact that the original PDF file is password-protected, even if the PDF file can be reconverted to PDF now, it may not be possible in the future due to the modification of the behavior of the PDF browser software.

We recommend, whenever possible, to remove passwords from PDF files by using CubePDF Utility, etc. after obtaining the owner password through proper channels, or by reviewing the operation between the parties (e.g. not to protect the password more than necessary). Also, please keep in mind that the method of removing the password by reconverting the PDF using CubePDF may well become impossible suddenly (due to an update of the PDF browser software, not CubePDF).