Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » PDF-Documents
PDF-Documents [message #41545] Fri, 10 August 2007 21:50 Go to next message
Eclipse UserFriend
Originally posted by: u.geerds.t-online.de

Hi to everyone,

i want to create PDF-Documents (reports) from a RAP based application. In
a normal application I would create a FileDialog to save the report in a
file or save the report in a temporary file and display the document via
AcrobatReader.

Can anybody tell me, how i solve the problem? It is possible to create
PDF-Documents with RAP and display it to the user?

Thanks, Uwe
Re: PDF-Documents [message #41567 is a reply to message #41545] Fri, 10 August 2007 23:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: b.muskalla.gmx.net

Hi Uwe,

as creating PDF files is not the task of RCP/RAP this should be done by
some 3rd party library like iText (I heard this works well but never
tested it myself).

For displaying the PDF you can use the RWT browser widget (as long as
the browser of the user has a pdf plugin). As you need to show
dynamically created PDFs you would need to to register them at the http
in order to deliver them to the outside world (see
http://www.eclipse.org/equinox/server/http_writing_applicati on.php).

You haven't asked but here is something interesting I found some days ago:
http://partners.adobe.com/public/developer/en/acrobat/PDFOpe nParameters.pdf

The document describes how the configure the Adobe PDF plugin by adding
additional parameters to the url to show/hide toolbar and stuff like
that. I think if that works well it's really nice to modify the UI of
the pdf viewer to better integrate it into your application.

Try also searching this newsgroup for pdf-related topics (see
http://tinyurl.com/2ppqqu).

Would be nice if you could give us little feedback if everything worked
well. Viewing pdf files is an interesting topic but no one of the
developers really has the time to play with it :-)

Greets
Benny

Uwe Geerds wrote:
> Hi to everyone,
>
> i want to create PDF-Documents (reports) from a RAP based application.
> In a normal application I would create a FileDialog to save the report
> in a file or save the report in a temporary file and display the
> document via AcrobatReader.
> Can anybody tell me, how i solve the problem? It is possible to create
> PDF-Documents with RAP and display it to the user?
>
> Thanks, Uwe
>
Re: PDF-Documents [message #41585 is a reply to message #41567] Sat, 11 August 2007 19:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: u.geerds.t-online.de

Hi Benjamin,

many thanks. It works!

Excuse me please, but i described my problem very to easy. I used iText in
a couple of projects - private and at my job - and i made only good
experiences with this library. In one project my plugin creates a
documentation with more than 600 pages and more than 20.000 internal
links. The library is very easy to use, is good documented and i found no
errors. If you or others need more information, you can buy the book
"iText in Action".

Back to my problem. I solved it via brower-widget and a implementation of
the extension org.eclipse.equinox.http.registry.servlets. In the servlet
class i set only the return type to "text/pdf" and write the document from
the session into the servlet stream. That's it. Very simple.

Greetings and thank's to you.
Uwe
Re: PDF-Documents [message #41602 is a reply to message #41585] Sat, 11 August 2007 19:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: b.muskalla.gmx.net

Hi Uwe,

good to hear that everything worked - one more happy RAP user ;-)

Just as a little sidenote: isn't the correct mime-type for pdf documents
"application/pdf".

Greets
Benny

Uwe Geerds wrote:
> Hi Benjamin,
>
> many thanks. It works!
>
> Excuse me please, but i described my problem very to easy. I used iText
> in a couple of projects - private and at my job - and i made only good
> experiences with this library. In one project my plugin creates a
> documentation with more than 600 pages and more than 20.000 internal
> links. The library is very easy to use, is good documented and i found
> no errors. If you or others need more information, you can buy the book
> "iText in Action".
>
> Back to my problem. I solved it via brower-widget and a implementation
> of the extension org.eclipse.equinox.http.registry.servlets. In the
> servlet class i set only the return type to "text/pdf" and write the
> document from the session into the servlet stream. That's it. Very simple.
>
> Greetings and thank's to you. Uwe
>
Re: PDF-Documents - source? [message #43003 is a reply to message #41585] Wed, 22 August 2007 18:48 Go to previous message
Eclipse UserFriend
Originally posted by: paulo.b.abreu.criticalsoftware.com

Hi Uwe,

i am trying to do the same but with no success. Would it be possible for
you to give the source code of your implementation?

Many regards,
Paulo.

Uwe Geerds wrote:
> Hi Benjamin,
>
> many thanks. It works!
>
> Excuse me please, but i described my problem very to easy. I used iText
> in a couple of projects - private and at my job - and i made only good
> experiences with this library. In one project my plugin creates a
> documentation with more than 600 pages and more than 20.000 internal
> links. The library is very easy to use, is good documented and i found
> no errors. If you or others need more information, you can buy the book
> "iText in Action".
>
> Back to my problem. I solved it via brower-widget and a implementation
> of the extension org.eclipse.equinox.http.registry.servlets. In the
> servlet class i set only the return type to "text/pdf" and write the
> document from the session into the servlet stream. That's it. Very simple.
>
> Greetings and thank's to you. Uwe
>
Previous Topic:[ANN] Extension Points moved
Next Topic:RAP demo startup problem
Goto Forum:
  


Current Time: Thu Apr 25 01:08:03 GMT 2024

Powered by FUDForum. Page generated in 0.03651 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top