You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by pedro <pe...@libero.it> on 2008/10/27 12:41:58 UTC

Preview PDF

Hi all 

   my problem is the same problem of all developer ,preview PDF.
   Now i'm use Adobe or Foxit but sometimes i have problem with speed,Adobe
Update Dialog ....
   I try the PreviewDialog but it's a frame and i want a modal dialog.
   I try to use PreviewPanel but i'm not able to show my document.
   Any definitive solution?


Thanks!!!
  

-- 
View this message in context: http://www.nabble.com/Preview-PDF-tp20186120p20186120.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


[ANN] VTD-XML extended edition released

Posted by jimmy Zhang <cr...@comcast.net>.
The Java version of extended VTD-XmL is released and available for download.
This version supports 256 GB max file sizes and memory mapped capabilities.
The updated documentation is also available for download. In short, you can
basically do full XPath query on documents that are bigger than memory space
available on your machine.

A special thanks to Duane May who provided value suggestions and inputs and
helped refine the VTD specs to make this happen.

To download the package and the documentation, go to
https://sourceforge.net/project/downloading.php?group_id=110612&use_mirror=&filename=vtd-xml_2.4_doc.zip&64621261

https://sourceforge.net/project/downloading.php?group_id=110612&use_mirror=&filename=ximpleware_extended_2.4.zip&99532507



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Preview PDF

Posted by pedro <pe...@libero.it>.
Thank you Laurent it works fine!
-- 
View this message in context: http://www.nabble.com/Preview-PDF-tp20186120p20190027.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Preview PDF

Posted by Laurent Morel <la...@al6.fr>.
pedro a écrit :
> Hi all 
>
>    my problem is the same problem of all developer ,preview PDF.
>    Now i'm use Adobe or Foxit but sometimes i have problem with speed,Adobe
> Update Dialog ....
>    I try the PreviewDialog but it's a frame and i want a modal dialog.
>    I try to use PreviewPanel but i'm not able to show my document.
>    Any definitive solution?
>
>   
I managed to make PreviewPanel working (it is not obvious though).
Here is an excerpt (with fop 0.95) :

            AWTRenderer renderer = new AWTRenderer();
            FOUserAgent userAgent = fopFactory().newFOUserAgent();
            userAgent.setRendererOverride(renderer);
            renderer.setScaleFactor(25.4 * panelWidth_pix / 
(Toolkit.getDefaultToolkit().getScreenResolution() * 210.0));
            renderer.setPreviewDialogDisplayed(false);
            renderer.setUserAgent(userAgent);
            Fop fop = fopFactory.newFop(userAgent);
            PreviewPanel previewPanel = new PreviewPanel(userAgent, 
null, renderer);

            // Standard fop usage...
            TransformerFactory factory = TransformerFactory.newInstance();
            Transformer transformer = factory.newTransformer();
            Source src = new StreamSource(foStream);
            Result res = new SAXResult(fop.getDefaultHandler());
            transformer.transform(src, res);

            // To handle several pages on the same panel :
            previewPanel.setDisplayMode(PreviewPanel.CONTINUOUS);
            // already done by setDisplayMode() : previewPanel.reload();

            return previewPanel;

panelWidth_pix is the desired panel width, in pixels. It is used to 
precalculate a scale factor
if you already know your  page width.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org