From owner-freebsd-questions@FreeBSD.ORG Thu Jun 11 00:14:26 2009 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94915106564A for ; Thu, 11 Jun 2009 00:14:26 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id 465728FC0A for ; Thu, 11 Jun 2009 00:14:25 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: by an-out-0708.google.com with SMTP id c3so624337ana.13 for ; Wed, 10 Jun 2009 17:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=18FucAcrL+kIeQhr1V8z2slwyMMlLFvHE3+/csvGczw=; b=eNc5OP9yyp6lXwfTBi/K+ad3y5DeaHdbE9wnPyhZp0Y2S2PxV0j+NQnhwRmjUfqn6B yksdHNg3KkVTZmeVsixpi7jh1PVbcKhLJR7oerT4EsvEy68f5gwvDuanBY0isqed0exE da9VeZ3BP9tkWDAJkeb+5n+vi7UsuMdUgHuB4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=SRzpdQQeViMvap022ovilkbujRE3H013g8zO1OEw3qx/9CnWDuKnrdFBV+WuKN9pPh P3/gIaYfkVpn9jMQESBClUapWrexuk4SCSSW8RoMHZ3WQCm6QJuXM5UOMJphkIyfEgGK clTFNoMkaqrQCm4eoVzSVTQVrGTYIYejDVhNE= MIME-Version: 1.0 Received: by 10.231.36.8 with SMTP id r8mr1046583ibd.8.1244677769119; Wed, 10 Jun 2009 16:49:29 -0700 (PDT) Date: Wed, 10 Jun 2009 16:49:29 -0700 Message-ID: From: "b. f." To: djuatdelta@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@FreeBSD.org Subject: Re: PDF inventory software X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2009 00:14:26 -0000 >Hmm.. The command > >find *.pdf -exec pdftotext {} \; > >works in directories in which no PDF file returns the "Document has >not the mandatory ending %EOF" error. When a directory contains one >of these files, none of the files get converted. Is there some way to >ignore or skip over this %EOF problem and continue operating on the >remaining PDFs? Use something like: find -X DIR -name '*.[pP][dD][fF]' | xargs -I % pdftotext "%" where DIR is the root of the filesystem directory hierarchy to be searched. Be careful of how many arguments you feed to pdftotext: it can overwrite files. You may need to handle some files with encryption, etc. differently. b.