- Posts: 3
- Thank you received: 0
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
Showing pages with different page sizes
IP: 192.168.0.70
12 years 6 months ago - 12 years 6 months ago #3884
by lukya
Showing pages with different page sizes was created by lukya
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.
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: 12 years 6 months ago by pkkori22.
IP: 192.168.0.70
12 years 6 months ago #3885
by radaee
Replied by radaee on topic Showing pages with different page sizes
plz try Global.def_view = 2;
in Global.default_config()
this may be OK, but not the best way.
in Global.default_config()
this may be OK, but not the best way.
- thiagopelikan
- Offline
- Junior Member
-
Less
More
- Posts: 36
- Thank you received: 0
9 years 6 months ago #11207
by thiagopelikan
Replied by thiagopelikan on topic Showing pages with different page sizes
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
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
9 years 5 months ago #11208
by nermeen
Replied by nermeen on topic Showing pages with different page sizes
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.
You need to calculate the scale on the page level, instead of on the whole document.
- thiagopelikan
- Offline
- Junior Member
-
Less
More
- Posts: 36
- Thank you received: 0
9 years 5 months ago #11211
by thiagopelikan
Replied by thiagopelikan on topic Showing pages with different page sizes
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?
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?
9 years 5 months ago #11212
by nermeen
Replied by nermeen on topic Showing pages with different page sizes
Which view mode you are using?
Note:
Note:
- The vertical mode --> fits according to screen width
- The horizontal/single/dual mode --> fits according to screen height
Time to create page: 0.433 seconds