From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QAToF-0007lU-Q4 for garchives@archives.gentoo.org; Thu, 14 Apr 2011 21:10:40 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0901E1C08F; Thu, 14 Apr 2011 21:09:13 +0000 (UTC) Received: from mail-vx0-f181.google.com (mail-vx0-f181.google.com [209.85.220.181]) by pigeon.gentoo.org (Postfix) with ESMTP id CA40F1C08F for ; Thu, 14 Apr 2011 21:09:13 +0000 (UTC) Received: by vxb39 with SMTP id 39so2215104vxb.40 for ; Thu, 14 Apr 2011 14:09:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=md70ibYgiNDmSVq3/pgcQosfUgrgPsIvKGfO9OgnaL8=; b=qsJbMbR1IMTU2bjSSTWNixkJ2ashg30Yy3HiVPhOi7wrsTXtTVXfODsW/yqsVeWoEa jI2qVwDb98PmavPHuJyzWXYrSu/YmH+gV6wTHWtm097AFVEVU1WdefweLGL3j08ARUMt x8acoodyvV1qgM/FXD+ooiUtO6yRESSwOI/Lw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=VYEmZbjePI/6eMKDsgQ1vstDK3b8vpCPqh7lD86esAa+tdKpmVK7xlZod+TAoVuKcB d7fytXnBK3cUygQCr7RGMgui8Pd9cNqm+kJZ+U7wmSeCZI6IkoMOvi1p55r1f374VV8c DcYBJx52ijd6gxd0h9sClCrmn92aSKIWALou0= Received: by 10.52.188.197 with SMTP id gc5mr1823479vdc.71.1302815353105; Thu, 14 Apr 2011 14:09:13 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.220.81.74 with HTTP; Thu, 14 Apr 2011 14:08:53 -0700 (PDT) From: Liviu Andronic Date: Thu, 14 Apr 2011 23:08:53 +0200 Message-ID: Subject: [gentoo-user] repair damaged pdf? To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: X-Archives-Hash: 383ab099c76568d9a2af688cb457f0a6 Dear all What is your experience with corrupted PDF files? Do you know any tool that can attempt to repair damaged PDF files? Does it make any sense to edit a PDF file in hex mode? I have a damaged PDF that cannot be opened with any of the about 10 tools that I've just tried. liv@liv-laptop:/tmp$ pdf2ps Class\ 1.pdf **** Warning: File has a corrupted %%EOF marker, or garbage after %%EOF. **** Warning: An error occurred while reading an XREF table. **** The file has been damaged. This may have been caused **** by a problem while converting or transfering the file. **** Ghostscript will attempt to recover the data. Error: /typecheck in --run-- Operand stack: --nostringval-- --nostringval-- 1 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1155/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:108/127(ro)(G)-- --dict:288/300(ro)(G)-- --dict:20/25(L)-- --dict:1/10(L)-- Current allocation mode is local GPL Ghostscript 8.71: Unrecoverable error, exit code 1 liv@liv-laptop:/tmp$ pdftops Class\ 1.pdf Error: PDF file is damaged - attempting to reconstruct xref table... Error: Top-level pages object is wrong type (null) Error: Couldn't read page catalog Any ideas how I could try to repair it? (It's not sensitive and it's small, so I could post it.) I tried pdftk, but it also fails. liv@liv-laptop:/tmp$ pdftk Class\ 1.pdf output Class\ 11.pdf java.lang.NullPointerException at com.lowagie.text.pdf.PdfReader$PageRefs.iteratePages(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader$PageRefs.readPages(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader$PageRefs.(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader$PageRefs.(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader.readPages(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader.readPdf(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader.(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader.(itext-2.1.7.jar.so) Error: Unexpected Exception in open_reader() Error: Failed to open PDF file: Class 1.pdf Errors encountered. No output created. Done. Input errors, so no output created. Regards Liviu -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail