RadaeePDF
RadaeePDF
Classic SDK
Master SDK
Server SDK
Command Line Tools
Pre-sales FAQ
Resellers
Download
All
SDK for Android
SDK for iOS
SDK for WinUWP
SDK for Server
Cordova Plugin
Xamarin Module
Documentation
Support
Tickets
Forum
Knowledge base
Press
Featured Apps
Android Apps carousel
iOS Apps carousel
Login
My orders
Index
Recent Topics
Search
Welcome,
Guest
Username:
Password:
Remember me
Forgot your password?
Forgot your username?
Create an account
Signin/Signup with:
Forum
Developing applications
Android development
Bitmap of page not generated properly
Questions about Android development and PDF
Page:
1
TOPIC:
Bitmap of page not generated properly
10 years 8 months ago
#6820
shikhar.shrivastav
Topic Author
Offline
New Member
Posts: 1
Thank you received: 0
My requirement is to generate bitmap of first page.
I am trying to generate Bitmap for first page using the following code
Bitmap bmp=Bitmap.createBitmap(width,height, Bitmap.Config.ARGB_8888);
bmp.eraseColor(Color.WHITE);
Matrix mat=new Matrix( values here );
doc.GetPage(0).RenderToBmp(bmp,mat);
I have a few questions, what parameters do I need to pass in the matrix constructor? Also how should I provide the *correct* width and height. I believe providing incorrect values there causes it to rescale it in wrong manner.
Please
Log in
or
Create an account
to join the conversation.
Bitmap of page not generated properly
10 years 8 months ago
#6822
radaee
Offline
Moderator
Posts: 1123
Thank you received: 73
like these codes:
float scale = 1.2f;//120%
int width = doc.GetPageWidth(pageNO) * scale;
int height = doc.GetPageHeight(pageNO) * scale;
Bitmap bmp = Bitmap.createBitmap(width,height, Bitmap.Config.ARGB_8888);
bmp.eraseColor(Color.WHITE);
Matrix mat = new Matrix( scale, -scale, 0, height );
Page page = doc.GetPage(0);
page.RenderToBmp(bmp,mat);
page.Close();//it is important.
Please
Log in
or
Create an account
to join the conversation.
Page:
1
Board Categories
Announcements
- Roadmap and releases
- Communications
Developing applications
- Android development
- iOS development
- Windows modern development
- Linux and Windows server
- Xamarin, Cordova and other third part
Requests and communications
- What do you like to see in next RadaeePDF SDK releases
- Application adopting RadaeePDF SDK
- Bug report
- Questions about licensing and sales
Forum
Developing applications
Android development
Bitmap of page not generated properly
Powered by
Kunena Forum
You are here:
Home
Forum
Requests and communications
Bug report
PDF Viewer Crashes
JavaScript is currently disabled.
Please enable it for a better experience.
You are now being logged in using your Facebook credentials