PdfViewer library full screen - java

I'm using PdfViewer.jar library for opening the PDF files in my Application,
The problem is, i want to show my pdf in full screen.

This one you can try it which works properly.
https://github.com/bitfield66/PdfViewerAndroid_Offline

Related

PDFBox - show icon for embedded files in pdf

I developed a Java PDF viewer using Apache PDFBox. The problem is, when rendering a page of a PDF, if the page has file attachments, there is no icon shown in PDFBox rendering, like there is a paper clip icon, when such a file is opened in Adobe PDF reader.
Is it possible to automatically have such icons in the rendering using PDFBox? I think I saw such a code some time ago, like a single line that switches this behavior on and off but I can't find it. Thanks.
This was fixed in PDFBOX-5394 and will be in the version 2.0.26. However only one single symbol will be shown at this time: a paperclip in fixed size.

Generate a png or jpeg image of a webpage using some java jar

I have a Java EE application running and on one of its webpage, I want to add a functionality that whenever the user presses a certain button, I get an image of ONLY the webpage which is currently displayed on the user end.
I have tried using a library for the purpose http://code.google.com/p/java-html2image/wiki/HtmlImageGenerator
My code using the above library is:
HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
imageGenerator.loadUrl("http://localhost:8080/scheduler/xxx")
imageGenerator.getLinks();
imageGenerator.saveAsImage("sos.png");
It does generate an image but my page contains a lot of css and colors but the image which is generated does not seem to add that color and infact produces a blue screen with almost no css applied.
Can someone help in the code or suggest any alternative libraries for the same?
How about using jQuery or java script, on googling a bit I found the following two existing posts in stackoverflow
generating a screenshot of a website using jquery
Take a screenshot of a webpage with JavaScript?

Custom PDF creation - Large images

Looking for a Java based PDF creation library. We're currently using Apache Velocity with HTML to render PDFs on the fly.
We'd like to be able to find a way to render large images (sometimes as big as 3000 x 1700) in a creative manner within the PDF container. For instance, a scrollable image pane within a PDF. This might not be possible within a PDF, I might be wrong.
Open source would ideal.
For a good PDF library you should take a look at iText: http://itextpdf.com/
I have used images of around 5000x4000 with iText without any problems.
I don't know if it is possible to create a working scrollpane inside a PDF, unless of course you were doing it through a custom PDF creator/viewer.
iText is open source but make sure to check out the AGPL license before you use it commecrially: http://itextpdf.com/terms-of-use/agpl.php
For just creating PDF files from images iText is a little overdimensioned. Give xsPDF a chance, it has no limits for images sizes and seems to be appropriate for your problem.
Just a FYI for anyone that may run into this in the future:
I used a library called PDFBox (http://pdfbox.apache.org/) to open a pre-existing PDF and modify the PDF with a custom sized PDFRectangle with the dimensions of the image. Then inserted the image and rectangle into that new page and got the desired results.
I didn't realize you could have multiple page sizes in a single PDF.

How to open pdf file in Jframe using itext

I would like to open a pdf file in a new Jframe.
the pdf file exist. I just need to open it and show it in a new Jframe.
I user itext to create the pdf file. do I need the same tool to open it.
please show me how.
thanks in advance.
It is not that easy and straightforward to open PDF inside Swing's JFrame. You can consider purchasing commercial tools such as pdfviewer or use embedded browser like JDIC and display your PDF using embedded PDF Viewer (i.e. Adobe Reader) inside an embedded browser but that is tricky as well.
I would rather seriously consider opening your PDF in OS default PDF viewer using java.awt.Desktop.open() method which is designed to be cross-platform. Note however, that Desktop class is available in Java 1.6 and later.

Remove Java Loading image while loading Applet

I am using applet viewer for my Web Application.
Before loading the applet viewer, is it possible to remove the java loading image.
Please check the attachment.
Thanks -
Haan
See the image parameter in Special Attributes of Applets. To 'remove' the image you might simply replace it with a 1x1 transparent GIF, but a more meaningful loading image would be best.

Categories

Resources