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

Zoom each page individually

More
10 years 2 months ago #10289 by mf
Hello, I'm using your library and I have a question about scaling each page of pdf corresinding to it's size. Because now I have pdf with different page sizes and all pages are rendered with the scale of the biggest page. I mean that all smaller pages are zoomed out and are represented smaller than the screen. Is there any way to fix this behavior?
More
10 years 2 months ago #10299 by Davide
Replied by Davide on topic Zoom each page individually
Hi,
I suggest you to look at this thread : www.radaeepdf.com/forum/Android-developm...e-i-set?limitstart=0

And this lines of code will may help you..
Code:
// to get current page width final float f1 = m_doc.GetPageWidth(m_pageno); // get screen width DisplayMetrics metrics = new DisplayMetrics(); WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); windowManager.getDefaultDisplay().getMetrics(metrics); int widthPixels = metrics.widthPixels; //set scale fit width m_view.vSetScale((widthPixels / f1), 0, 0);

You can also fit height changing some params..
Time to create page: 0.415 seconds
Powered by Kunena Forum