pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Camilo Casadiego <Camilo.Casadi...@adv.co>
Subject RE: Pivot pdf viewer
Date Thu, 01 Mar 2012 20:54:18 GMT
greeeat! tha was just i need...



Camilo Casadiego Espitia
Arquitecto de SW
* + 57 1 6393000
* camilo.casadiego@adv.com.co<mailto:camilo.casadiego@adv.com.co>
* http://www.adv.com.co<http://www.adv.com.co/>
Carrera 11 No. 93 - 53 P7
Bogotá - Colombia

De: Jérôme Serré [mailto:jerome.michel.serre@gmail.com]
Enviado el: Thursday, March 01, 2012 11:04 AM
Para: user@pivot.apache.org
Asunto: RE: Pivot pdf viewer

You can create the pdf and, if the client is under windows, use this code:

public void open(String fileName) throws BizException {
        try {
                java.awt.Desktop.getDesktop().open(new File(fileName));
        } catch (IOException ioe) {
                throw new BizException(ioe.toString());

Jérôme Serré
Manage your cellar
Ma cave<http://www.macave.eu/>

De : Sandro Martini [mailto:sandro.martini@gmail.com]
Envoyé : jeudi 1 mars 2012 16:58
À : user@pivot.apache.org<mailto:user@pivot.apache.org>
Objet : Re: Pivot pdf viewer

you could ask the user what to do, maybe ask with a modal dialog if Save the PDF, or Open
it, then close it and proceed.

The Open (show) the PDF is not-so-simple of course ... I'd suggest to try to wrap PDFRenderer
in a Swing application, and execute it.

Quick idea: first try with the Desktop associated action, should be multi-platform, your "GUI
Experience" could not be so integrated, but probably is it works could be even safer (for
example in case of application crash only the PDF Viewer go down).
Some info here:
  -- it hav even a sample application, so you can try without coding ...

Otherwise: take a look at SwingDemo, under Demos, and try to make it work opening a PDF, it's
up to you if in a mixed Swing/Pivot GUI, or if only a Swing GUI.
In case of problems (you have to try with some different PDF, even big, and possibly even
from different sources (generated in different ways and with different tools), try to convert
the PDF into an image (using conversions available in many pdf libraries for Java).

Then, verify in your application if it's better to have the PDF Viewer as external app (first
case), or swing, or mixed swing/pivot, and chose a deploy option for it (in any case I'd keep
its jar different from the rest of your app).
And see if it's better to execute it as another process (external, or even a Java process),
or directly inside your app.

Tell me what you think ... and keep us updated.


View raw message