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

center page horizontal und vertical

More
IP: 192.168.0.71 11 years 7 months ago - 11 years 7 months ago #7221 by custompdf
I'm using PDFViewHorz to display the pdf when in portrait view.
I need to fit the pdf to height and because the pdf view height is not the the full screen height I can't use PDFViewVert or so.
It's a single site pdf and i want the page to be centered horizontally.
I tried to set Global.def_view = 3, tried to set the m_view.vSetPos(pos, w/2, h/2); but nothing works.
the pdf is centered vertical but I need both. vertical and horizontal.
Whatever I tried the pdf page stays at the left screen border.
Any ideas?

Because of the project deadline I really would need a quick answer if anyone knows how to get this work!
Last edit: 11 years 7 months ago by Chaâbane.
More
IP: 192.168.0.71 11 years 7 months ago #7226 by radaee
set def_view = 3 in Global.default_config(), but not out of Global class.
or invoke PDFReader.PDFSetViewer(3), at runtime.
More
IP: 192.168.0.71 11 years 7 months ago #7228 by custompdf
I do!
Code:
public static void default_config() { selColor = 0x400000C0;// selection color fling_dis = 1.0f;// 0.5-2 fling_speed = 0.1f;// 0.05 - 0.2 def_view = 3;// 0,1,2,3,4,5,6 0:vertical 1:horizon 2:curl effect 3:single // 4:SingleEx 5:Reflow, 6:show 2 page as 1 page in land // scape mode render_mode = 1;// 0,1,2 0:draft 1:normal 2:best dark_mode = false;// dark mode zoomLevel = 3; need_time_span = true; setAnnotTransparency(Color.TRANSPARENT); }


Still the same. Pdf page sticks on left corner
More
IP: 192.168.0.71 11 years 7 months ago #7254 by custompdf
So there is no other way?
More
IP: 192.168.0.71 11 years 6 months ago #7518 by cerv82
I'm getting the same incorrect behavior, I could make the Page get centered using the PDFViewVert, but the content is being cropped at the bottom.

Any update on this?
More
IP: 192.168.0.71 11 years 5 months ago #7615 by cerv82
I know that is kind of late but I just figured out how to center the page, I'm showing only a single page and it fits the page View height/width. I can share my code, just let me know.
.

custompdf wrote: So there is no other way?

Time to create page: 0.443 seconds
Powered by Kunena Forum