Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 97792 invoked from network); 23 Dec 2008 20:15:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Dec 2008 20:15:59 -0000 Received: (qmail 8728 invoked by uid 500); 23 Dec 2008 20:15:52 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 8677 invoked by uid 500); 23 Dec 2008 20:15:52 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 8668 invoked by uid 99); 23 Dec 2008 20:15:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Dec 2008 12:15:52 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [195.121.247.23] (HELO psmtp09.wxs.nl) (195.121.247.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Dec 2008 20:15:44 +0000 Received: from LP2 (ip565e6edd.direct-adsl.nl [86.94.110.221]) by psmtp09.wxs.nl (iPlanet Messaging Server 5.2 HotFix 2.15 (built Nov 14 2006)) with ESMTP id <0KCC00CONIXKZ5@psmtp09.wxs.nl> for users@cocoon.apache.org; Tue, 23 Dec 2008 21:15:21 +0100 (MET) Date: Tue, 23 Dec 2008 21:15:22 +0100 From: Marten van der Honing Subject: RE: generate pdf from xml with embedded image? In-reply-to: <4BCE6512FC824C1DB153B40535DC9688@LP2> To: users@cocoon.apache.org Message-id: <6D6C74008D604181BA5BDCBB9A5A0129@LP2> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Mailer: Microsoft Outlook, Build 10.0.6838 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal Thread-index: AcllNiKb4OXGEyZRTWKaUUTprAGzmAAAoIcgAACQC7A= X-Virus-Checked: Checked by ClamAV on apache.org Now i tried: Also no image is displayed. Is this possible with cocoon? I am afraid i do have to write images temporary to the filesystem :-( -----Oorspronkelijk bericht----- Van: Marten van der Honing [mailto:mvdhoning@noeska.com] Verzonden: dinsdag 23 december 2008 21:02 Aan: users@cocoon.apache.org Onderwerp: RE: generate pdf from xml with embedded image? With i get the base64 content as tekst inside the pdf. But with i still get no visible image :-( The error i got before was due to an mistake i made in another part of my xsl stylesheet. -----Oorspronkelijk bericht----- Van: Joerg Heinicke [mailto:joerg.heinicke@gmx.de] Verzonden: dinsdag 23 december 2008 20:39 Aan: users@cocoon.apache.org Onderwerp: Re: generate pdf from xml with embedded image? Marten van der Honing wrote: > Peter: Did you write a preprocessor in cocoon? Where can i find more > info on that? > > Meanwhile i tried another approach: > You might try just to be sure. > src="url('data:image/gif;base64,{$image-base64}')" > height="3cm" width="3cm" /> > > But now i get an error in html instead of an pdf file: > > java.lang.NullPointerException: > > Cocoon stacktrace[hide] > > java.lang.NullPointerException cocoon://fop_post/xsl - 4:14 > > Exception in StreamGenerator.generate() cocoon://fop_post/xsl - 4:14 > [TransformerException] context://fop_post/sitemap.xmap - 11:32 > context://fop_post/sitemap.xmap - 7:33 > context://fop_post/sitemap.xmap - 44:37 > context://fop_post/sitemap.xmap - 43:42 > context://fop_post/sitemap.xmap - 32:38 > context://sitemap.xmap - 1034:92 Can you post parts of the actual Java stack trace? Joerg > Maybe i should try to show the base64 as text in the pdf first to see > if it still there. > > -----Oorspronkelijk bericht----- > Van: Peter Flynn [mailto:pflynn@ucc.ie] > Verzonden: donderdag 18 december 2008 10:24 > Aan: users@cocoon.apache.org > Onderwerp: Re: generate pdf from xml with embedded image? > > > Ken Starks wrote: > [...] >> I did have a few images that were stored also in a database, but I >> would pre-process them in a seperate stage, generating a local copy, >> and populating a table of the database with the path. This was a >> batch process, not an interactive one, and it used python rather than >> cocoon. (Actually, it could do a minor amount of image-processing as >> well, such as cropping, changing contrast, creating thumbnails, >> changing to a different format, Etc and used Image magick as well as >> python). > > I do something very similar, taking in Word XML documents. The > preprocessor extracts any encoded image data, converts them back to > image format, creates thumbnails and web-res versions, and adds > details of them to an XML file in their directory, rather than using a > database. The XSL[T] processes then reference them externally as > images, which is probably faster than doing database extraction and > image conversion in real time. > >> I suppose it depends on the amount of storage you have, and how >> important it is to you to store your images on a database. > > In this case there are typically only a handful of images, so a > database > would be overkill: YMMV. > > ///Peter --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org