Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
pdfbox文档已加密错误_Pdf_Pdfbox - Fatal编程技术网

pdfbox文档已加密错误

pdfbox文档已加密错误,pdf,pdfbox,Pdf,Pdfbox,我有一个正在用pdfbox解析的文件。文件没有加密,我可以打开文件。但是,以下代码行来自PDFBox try { document = PDDocument.load( inpFilename); if( document.isEncrypted() ) { System.err.println( "Error: Document is encrypted with

我有一个正在用pdfbox解析的文件。文件没有加密,我可以打开文件。但是,以下代码行来自PDFBox

    try
        {
            document = PDDocument.load( inpFilename);


            if( document.isEncrypted() )
            {
                System.err.println( "Error: Document is encrypted with a password." );
                return;

            }

创建错误:
“错误:文档使用密码加密。”
。知道为什么会这样吗?是否有各种pdf加密(允许您读取,但不能使用pdfbox处理)

在这里查看答案:


演示如何在未指定用户密码的情况下轻松解密文档。

要添加,pdfimages可以在pdf上操作,创建图像。能够在adobe reader中打开文档并不意味着文档未加密。不幸的是,我手边只有手机,无法查看您的PDF,但我猜您的文档是使用默认用户密码加密的……您的链接在最初工作时允许下载两个文档,AN9780300883.PDF和b303635a.PDF,您对哪一个有问题?前一个不是加密的,但后一个是!