From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/73455 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: Huge PDFs Date: Thu, 29 Dec 2011 17:57:20 +0100 Message-ID: References: <4EFC96AB.5040604@gmx.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1325177876 11332 80.91.229.12 (29 Dec 2011 16:57:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2011 16:57:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 29 17:57:52 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RgJIc-0007bq-7m for gctc-ntg-context-518@m.gmane.org; Thu, 29 Dec 2011 17:57:50 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4B8AACB1B7; Thu, 29 Dec 2011 17:57:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BRQzWZ9lyYdA; Thu, 29 Dec 2011 17:57:34 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 93A10CB1B3; Thu, 29 Dec 2011 17:57:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 62F1ECB1B3 for ; Thu, 29 Dec 2011 17:57:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xMp1VotLFJ28 for ; Thu, 29 Dec 2011 17:57:22 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 0F413CB1B0 for ; Thu, 29 Dec 2011 17:57:22 +0100 (CET) Original-Received: from mail-iy0-f169.google.com (mail-iy0-f169.google.com [209.85.210.169]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pBTGvKXs021229 for ; Thu, 29 Dec 2011 17:57:21 +0100 Original-Received: by iacb35 with SMTP id b35so28704510iac.14 for ; Thu, 29 Dec 2011 08:57:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MHWOE9eSKlKDI0y1iQbhOQV9VzzF5DLc8pGIojj4hw0=; b=BgzuZFq6UP1KAZzbffCcYAduaNk42ZMKGjCMATn6diu0vjHjDxyN3kSVx2ipT1GED3 livkym/M0VXUJwMURNPog0+rd7Vm70QreAhmuJ78QkTk7EX6RPdCDfRUAhFJzMBh8HzV TyR92dccUUdmZwWjGzyVY16PdKtwKl3ECD8Go= Original-Received: by 10.42.189.5 with SMTP id dc5mr36775082icb.51.1325177840355; Thu, 29 Dec 2011 08:57:20 -0800 (PST) Original-Received: by 10.50.57.131 with HTTP; Thu, 29 Dec 2011 08:57:20 -0800 (PST) In-Reply-To: <4EFC96AB.5040604@gmx.de> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.210.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rGf4VllH - 3ae7a95abd75 - 20111229 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:73455 Archived-At: On Thu, Dec 29, 2011 at 5:34 PM, Jan Heinen wrote: >> pdf -> pdftops ->ps ->ghostscript ->pdf >> seems to be more robust and gives better results >> -- >> luigi > > I will give it a try: > Can you tell me the commands with all the parameters I need ? > > > I have tried the following: > > #!/bin/sh > suffix="_opt.pdf" > pdftops -paper match -level3 $1.pdf tmp.ps > gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook > -dColorConversionStrategy=/LeaveColorUnchanged -dBATCH -dNOPAUSE > -sOutputFile=$1.pdf$suffix tmp.ps > rm tmp.ps > > > But in some cases the PDF-files got bigger instead of smaller. Yes this also my experience. I suppose that gs acts only on images, not streams compression You can try qpdf http://qpdf.sourceforge.net see 3.4. Advanced Transformation Options http://qpdf.sourceforge.net/files/qpdf-manual.html#ref.advanced-transformation -- luigi ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________