Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Save preview of page into the file

More
IP: 192.168.0.71 11 years 5 months ago #7528 by petr.sklenicka
Hello,
there is a class PDFViewThumb in your library. I use this class for displaying previews of pages, but the rendering of the previews is a little bit slow.
Does your library support some function for saving a rendered preview into a .png, .jpeg or some other format? I would like to save rendered previews into a file and when the preview will be needed, there will be no need to render it again, but a saved image will be used.
Is there any functionality for this there in your library?


Best regards,
Petr
More
IP: 192.168.0.158 11 years 5 months ago #7529 by nermeen
You can do something like:
Code:
Bitmap mBitmap = Bitmap.createBitmap(200, 200, Bitmap.Config.ARGB_8888); page.RenderToBmp(mBitmap, new Matrix( scale, -scale, (float)0, (float) 200 )); //save the created thumb into the file system try { FileOutputStream fos = new FileOutputStream(thumbsPath); mBitmap.compress(CompressFormat.JPEG, 100, fos); } catch (java.io.IOException e) { }
Time to create page: 0.385 seconds
Powered by Kunena Forum