I also use file-system stored images, or url-stored images rather than
database-stored images
when using xsl-fo and cocoon.
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 suppose it depends on the amount of storage you have, and how
important it is to you
to store your images on a database.
I no longer do so; I store the 'master-copy' on DVD or CD and a working
copy on the filing
system with a table in the database linking to its path, as well as a
key for the DVD and
the image location on the DVD or CD.
But then I don't much like 'Blobs' on a relational database anyway.
Marten van der Honing wrote:
Hello,
No the database initiates to contact with cocoon. I do not want cocoon to
contact the database.
Besides it would not know how to define a database-reader from cocoon.
The image is base64 encoded do i need to put that in another format? Or tell
xsl-fo something about that?
Greetings,
M van der Honing
-----Oorspronkelijk bericht-----
Van: Varga Zsombor [mailto:[email protected]]
Verzonden: woensdag 17 december 2008 22:42
Aan: [email protected]
Onderwerp: Re: generate pdf from xml with embedded image?
Is not possible to define a database-reader for reading only the image, with
a matcher, what matches to your request?
Zsombor
On Wed, Dec 17, 2008 at 22:34, Marten van der Honing <[email protected]>
wrote:
Hello
I know that also works but the xml is generated from a database. The
image is also stored inside the database and is not available on a
local path on the server. So in this case the external-graphic is of
no use for me.
Greetings,
M van der Honing
-----Oorspronkelijk bericht-----
Van: Varga Zsombor [mailto:[email protected]]
Verzonden: woensdag 17 december 2008 22:28
Aan: [email protected]
Onderwerp: Re: generate pdf from xml with embedded image?
Hello
i used to display images in my pdf files in this way: <fo:block >
<fo:external-graphic width="50mm" height="25mm"
src="{/my_path_to/my_image.jpg"/> </fo:block >
try it.
Zsombor
On Wed, Dec 17, 2008 at 19:39, Marten van der Honing
<[email protected]>
wrote:
Hello,
I am puzzled on generating an pdf from the following xml: <?xml
version="1.0" encoding="UTF-8"?> <ROWSET>
<ROW>
<ID>2</ID>
<FILE_NAME>Image1</FILE_NAME>
<MIME_TYPE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Oiqj3TS1CdLSCDSNMGoOiHEhqgqahyvCCCKgSAdmmpqZqaZoWyCBrCj74
WYGqtS7qQQ+5hsrrBhEAADs=</IMAGE>
</ROW>
</ROWSET>
I assumed it should be done like in the xsl file:
<fo:block>
<fo:instream-foreign-object content-type="image/gif">
<xsl:value-of select=".//IMAGE"/>
</fo:instream-foreign-object>
</fo:block>
But that does not show the image in the pdf.
The pdf is generated though but with no image visible.
How should i do this if it can be done?
Thanks for your help in advance.
Greetings,
M van der Honing
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]