RadaeePDF.com :: Topic: Showing pages with different page sizes (1/2)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC: Showing pages with different page sizes

Showing pages with different page sizes 4 years 2 months ago #3884

  • lukya
  • lukya's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
For a pdf file having pages with uneven size, the largest page fits the view correctly while the others are displayed smaller.
What i want obviously, is that all pages should fit the view correctly irrespective of page size.

One option would be to open pdf files and resize all pages to fit the screen correctly. This should be fine for pages with text and vector graphics. However, is not desirable in case where some pages have high resolution graphics which need to be zoomed while others can have simple image which will not look crips if the page size is increased.
Also, there is additional burden of either doing this activity every time i open a file or keeping track of which files are converted and which are not.

Is there an easier way to make sure that all pages fit the screen correctly?

I found another similar question but it does not have any satisfactory answer: www.androidpdf.mobi/forum/Android-develo...-to-screen-size#3623


EDIT 1: I need the same on iOS as well, but i do not want to spam by posting the same question twice. I am hoping there will be a common solution, but if theres a different way to solve this on android and iOS please let me know.
Last Edit: 4 years 2 months ago by pkkori22.
The administrator has disabled public write access.

Showing pages with different page sizes 4 years 2 months ago #3885

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
plz try Global.def_view = 2;
in Global.default_config()
this may be OK, but not the best way.
The administrator has disabled public write access.

Showing pages with different page sizes 1 year 2 months ago #11207

Hi all,
I have this same problem, but Global.def_view = 2 does not help me, I still need zoom after page changed. Is there any other solution?

Tks,
Thiago
The administrator has disabled public write access.

Showing pages with different page sizes 1 year 1 month ago #11208

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 709
  • Thank you received: 49
  • Karma: 18
To handle such a case, the best solution whould be to change vLayout method of the view mode you prefere (vertical, horizontal, single...).
You need to calculate the scale on the page level, instead of on the whole document.
The administrator has disabled public write access.

Showing pages with different page sizes 1 year 1 month ago #11211

Hi,
I'm trying to do this for each page change:

pdfView.vSetScale(newScale, 0, 0);
pdfView.vCenterPage(currentPage);

The scale is correctly, it fits to the width, but my page is not centering correctly, it goes to the bottom of the screen and cuts a piece of bottom part of the page.

Is there anything else I could do to center the page?
The administrator has disabled public write access.

Showing pages with different page sizes 1 year 1 month ago #11212

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 709
  • Thank you received: 49
  • Karma: 18
Which view mode you are using?

Note:
  • The vertical mode --> fits according to screen width
  • The horizontal/single/dual mode --> fits according to screen height
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Powered by Kunena Forum