3 Replies Latest reply on Sep 13, 2007 5:27 AM by pmuir

    getting pdf bytes?

    dustismo

      Hello,

      I'd like to be able to access the bytes for a pdf that I created. Because the bytes are sent to the browser after a redirect I can find no way of occomplishing this. Is it possible? I either like to be able to get at the pdf bytes within my seam app or by doing a simple wget.

      any help?

      thanks,
      Dustin

        • 1. Re: getting pdf bytes?

          Look up the documentStore component in the same conversation and pull out the document by id.

          • 2. Re: getting pdf bytes?
            dustismo

            Thanks for the response. I don't think that will work for me though.

            What I want is a way to use the pojoCache to store the pdf, so I can have a servlet that the user requests a pdf from and after checking that the user has access to the pdf then it serves it from the cache or -- renders it, caches it, sends it

            the problem with access the DocumentStore from the conversation is that the user has to have already triggered the render from their browser.. I'd like to be able to trigger the rendering from within my servlet..

            Any further advice would be helpful..

            thanks,
            Dustin

            • 3. Re: getting pdf bytes?
              pmuir

              I would suggest the alternative approach of extending DocumentStore to do the caching for you.

              You should be able render the document without the user hitting the page using Renderer (as you do for mail).

              Post any problems you get with this approach and we can look at getting patches into Seam to fix (I've never tested Renderer for PDFs).