Zoom each page individually - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: Zoom each page individually

Zoom each page individually 2 years 9 months ago #10289

  • mf
  • mf's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
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?

Please Log in or Create an account to join the conversation.

Zoom each page individually 2 years 9 months ago #10299

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 18
  • Thank you received: 65
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..
// 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..

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum