From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 6E9FCBC6B for ; Mon, 29 Oct 2007 09:52:19 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAIY8JUfAXQImh2dsb2JhbACOYwIBCAop X-IronPort-AV: E=Sophos;i="4.21,341,1188770400"; d="scan'208";a="18716465" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 29 Oct 2007 09:52:19 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l9T8qFm5021690 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 29 Oct 2007 09:52:18 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAIY8JUfAbSoIh2dsb2JhbACOYwIBCAop X-IronPort-AV: E=Sophos;i="4.21,341,1188770400"; d="scan'208";a="3772030" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Oct 2007 09:52:18 +0100 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from einhorn.in-berlin.de (localhost [127.0.0.1]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id l9T8q3cI004461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 29 Oct 2007 09:52:03 +0100 Received: (from www-data@localhost) by einhorn.in-berlin.de (8.13.6/8.13.6/Submit) id l9T8q3P5004459 for caml-list@inria.fr; Mon, 29 Oct 2007 09:52:03 +0100 X-Authentication-Warning: einhorn.in-berlin.de: www-data set sender to oliver@first.in-berlin.de using -f Received: from dslb-088-073-078-038.pools.arcor-ip.net (dslb-088-073-078-038.pools.arcor-ip.net [88.73.78.38]) by webmail.in-berlin.de (IMP) with HTTP for ; Mon, 29 Oct 2007 09:52:03 +0100 Message-ID: <1193647923.47259f33216af@webmail.in-berlin.de> Date: Mon, 29 Oct 2007 09:52:03 +0100 From: Oliver Bandel To: caml-list@inria.fr Subject: Re: [Caml-list] Basic typesetting References: <9f09a07a0710280714h6617fcc6s8647ef9ba077c30b@mail.gmail.com> <1193591609.4724c3394a824@webmail.in-berlin.de> <4724F0F6.7090603@gmail.com> <86fxzuykzd.fsf@Llea.celt.neu> In-Reply-To: <86fxzuykzd.fsf@Llea.celt.neu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Miltered: at discorde with ID 47259F3F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bandel:01 in-berlin:01 reimplement:01 ghostscript:01 imho:01 oliver:01 oliver:01 caml-list:01 output:02 construct:02 executable:03 algorithms:03 shell:04 size:95 typesetting:05 Zitat von michael.le_barbier@laposte.net: [...] > So if you use a typesetting engine as a backend to typeset text, you > have three ways to know the size of an object: > 1. ask the engine; > 2. examine the engine's output; > 3. reimplement the engine's algorithms. > You do not seriously consider 3. as an option, do you? [...] One can ask Ghostscript (gs) for the bounding box. I think it was something like $ gs -sDEVICE=bbox mypsfile.ps and this should also work with pdf-files. But then you get the bounding-box of the whole file. So you have to use this way for each construct of your page, what IMHO makes no sense. But if you need this only occasionally, it might make sense. I don't know the "fop" that was mentioned, but I gs is about 5 MB big executable, and it's an interpreter. But it's not written in Java, maybe it's faster and lighter than the "fop" ;-) Ciao, Oliver P.S.: Or make a server as a wrapper around gs, so you do not have to restart it again and again ;-) But as far as I know, some TeX-Implementations are in work, that are running as a formatting-daemon. So, this might be also a way to make efficient typesetting. But if it's only for one single page, using gs by hand, invoked from the shell might be ok ;-)