Hi everybody,
I want to remind you that if you want to split or merge pdf documents and PDFsam gives you the message “PdfReader not opened with owner password” it’s because you must provide the owner password to be able to manipulate the document. If Acrobat Reader doesn’t ask you for a password it’s because it opens the documents in “view” mode, but splitting or merging pdf documents are considered “edit” mode and, as the error message states, you must provide a owner password.
I multi-scanned pages with IrfanView and CanoScan Toolbox (thereby creating multiple pdf files), and tried to create one pdf file out of the multiple pages (IrfanView can do that as well, but the resolution is not good then), but it does not work, because of this error. However, I never indicated a password, so I wouldn’t know what password to fill in. Neither can I change the security settings of the pdfs, or can I?
And if there would be a password (maybe it is the ‘owner name’), how could that be provided within PDFsam?
just use the code to make itext ignore password:
public static PdfReader unlockPdf(PdfReader reader) {
if (reader == null) {
return reader;
}
try {
Field f = reader.getClass().getDeclaredField(“encrypted”);
f.setAccessible(true);
f.set(reader, false);
} catch (Exception e) { // ignore
}
return reader;
}
i leave legall issues up to you by executing the code above.
After PdfReader reader, add this line:
PdfReader.unethicalreading = true;
Thanks, Works excelent.
I don’t think that it is unethical to merge pdfs. It would not even be copyright infringement to do so.
I suggest removing the switch, it just makes the life of the user more difficult. I am merging pdf files at work, I have no idea why I get the error message. No one ever set a password, and the person who made the files left.
Poseng
I also could not run this software for the reason above, however, my PDF document never had a password on it so not sure why it’s failing.
Not working for me
i’m using pdfsam V2.2.4. When i scan my documents (100 pages), some pages are missing. so i use pdfsam to merge or insert that missing pages. but some time after merge, file was unable to open or shows error messages like “Insufficient data for an image” and ” An error exists on this page. Acrpbat may not display the page correctly. please contact the person who creaded the pdf document to correct the problem” kindly advice on this issue.
Have you tried a recent version of PDFsam? 2.2.4 is ages old and not supported anymore
Works like a charm. Thx