cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janet Yvan <Yja...@dsmdir.cea.fr>
Subject RE: Render a PDF in the cocoon form
Date Wed, 29 Jun 2005 11:25:13 GMT
So if I well understood your mind, you want to extract the PDF embedded data
to display them into your cocoon form? Some kind of "reverse xsl-fo"?

 

Sorry, I don't know any reverse tool for PDF, and especially none doing PDF
to XML conversion. If someone does, I'm interested in too ...

 

 

Yvan

  _____  

De : baskar.ganesh@wipro.com [mailto:baskar.ganesh@wipro.com] 
Envoyé : mercredi 29 juin 2005 11:55
À : users@cocoon.apache.org
Objet : Render a PDF in the cocoon form

 

Hi all,

 

Can anyone help me out in the following issue:-

 

How do I render a PDF in the cocoon form using byte array as the Input to
the Cocoon form?

 

The actual requirement is I have a byte array object which has the byte form
of the PDF. The PDF which is remotely located will be read through a
FileReader object into a byte array object and get the byte array object.
Using the contents of the byte array object without writing it again to the
file system I would like to directly render it to the cocoon form and
display the same PDF on the browser. Code snippet would look something
similarly to the one given below. 

 

 

            String fileName = "usr1/examples/resources/pdf_Demo.pdf";

            File file = new File (fileName);

            String fileContents = "";

            BufferedReader br = new BufferedReader (new FileReader (file));

                        while ((line = br.readLine()) != null)

                        {

                                    fileContents = line;

                        }

                        int fileLen = fileContents.length();

                        byte [] fileByte = new byte [fileLen];

                        fileByte = fileContents.getBytes ();

 

   Now using the file Byte object contents I need to display the PDF in the
cocoon form.

 

Regards,

Baskar

 



Confidentiality Notice 

The information contained in this electronic message and any attachments to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.
	

Mime
View raw message