Thanks a-lot. Will look into it.

Eyal Golan
[email protected]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Sat, Apr 25, 2009 at 11:16 PM, Ernesto Reinaldo Barreiro <
[email protected]> wrote:

> If what you want is streaming back the PDF contents something like:
>
> ResourceLink fileLink  = new ResourceLink("file", new
> DynamicWebResource(file.getName()) {
>
>            private static final long serialVersionUID = 1L;
>
>            @Override
>            protected ResourceState getResourceState() {
>                return new DynamicWebResource.ResourceState() {
>                    @Override
>                    public String getContentType() {
>                        return DownLoadExportPanel.this.getContentType();
>                    }
>
>                    @Override
>                    public byte[] getData() {
>                        try {
>                            return FileUtils.bytes(new
> FileInputStream(file));
>                        } catch (Exception e) {
>                            return null;
>                        }
>                    }
>                };
>            }
>        });
>
> <a wicket:id="file"><span wicket:id="message"></span></a>
>
> will do the Job. Here I'm assuming the PDF is in a file...
>
> 2- If what you want is showing the PDF inside an iframe maybe the following
> link can be of some help
>
>
> http://cwiki.apache.org/WICKET/displaying-content-eg-pdf-excel-word-in-an-iframe.html
>
> Best,
>
> Ernesto
>
> On Sat, Apr 25, 2009 at 9:33 PM, Eyal Golan <[email protected]> wrote:
>
> > Hi,
> > I've been struggling to understand the concept of sending resources (such
> > as
> > PDF) to the output with Wicket.
> > I searched many site and wasn't able to find anything useful for me.
> > (I found only one thread in this mailing list regarding iText).
> >
> > Anyway,
> > Suppose I know how to create a PDF file.
> > How can I then show it to the user?
> >
> > Suppose I have created the Document. What next?
> >
> > If someone can give a direction in here or a link to good example, I
> would
> > be most appreciate.
> >
> > Thanks
> >
> > Eyal Golan
> > [email protected]
> >
> > Visit: http://jvdrums.sourceforge.net/
> > LinkedIn: http://www.linkedin.com/in/egolan74
> >
> > P  Save a tree. Please don't print this e-mail unless it's really
> necessary
> >
>

Reply via email to