center page horizontal und vertical - 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: center page horizontal und vertical

center page horizontal und vertical 3 years 7 months ago #7221

  • custompdf
  • custompdf's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
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: by Chaâbane.
The topic has been locked.

center page horizontal und vertical 3 years 7 months ago #7226

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 830
  • Karma: 43
  • Thank you received: 10
set def_view = 3 in Global.default_config(), but not out of Global class.
or invoke PDFReader.PDFSetViewer(3), at runtime.
The topic has been locked.

center page horizontal und vertical 3 years 7 months ago #7228

  • custompdf
  • custompdf's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
I do!
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
The topic has been locked.

center page horizontal und vertical 3 years 6 months ago #7254

  • custompdf
  • custompdf's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
So there is no other way?
The topic has been locked.

center page horizontal und vertical 3 years 6 months ago #7518

  • cerv82
  • cerv82's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
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?
The topic has been locked.

center page horizontal und vertical 3 years 5 months ago #7615

  • cerv82
  • cerv82's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
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?

The topic has been locked.
  • Page:
  • 1
Powered by Kunena Forum