Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Zoom each page individually 8 years 2 months ago #10289

  • mf
  • mf's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • 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 8 years 2 months ago #10299

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • 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