Fit PDF to screen by width or height - 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: Fit PDF to screen by width or height

Fit PDF to screen by width or height 3 years 2 months ago #8070

  • phifa
  • phifa's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0
Hello everybody,

We are using pdfviewer-framework for Android. We display the PDF file with a PDFReader instance. Our goal is to fit the whole pdf file to the screen and center it if its needed. Currently the PDFReader instance fits the PDF file to the width of the screen. The result of this behaviour is, that if the PDF file is too big, the PDFReader fits it to the width and makes it scrollable.

The approach described in this post: www.androidpdf.mobi/forum/Android-develo...screen?start=12#5023 didn't work for us.
We set the scale to 0, but the behaviour of the PDFReader is the same. It fits the file to the width and makes it scrollable.

The two attachments describes the problem too. The first shows the behaviour we want and the second the behaviour we get.

Do we have to do something similar to the approach mentioned in this post: www.androidpdf.mobi/forum/Android-develo...start=0&start=6#3944

Then where we have to implement it? Is there a smarter solution to fix our problem?

Please let us know.

Regards
Philipp
Attachments:
The topic has been locked.

Fit PDF to screen by width or height 3 years 2 months ago #8110

  • phifa
  • phifa's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0
Any updates?
The topic has been locked.

Fit PDF to screen by width or height 3 years 2 months ago #8112

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 754
  • Karma: 20
  • Thank you received: 55
Have you tried to use the single layout??

by changing def_view = 3 in Global.default_config()
The topic has been locked.

Fit PDF to screen by width or height 3 years 2 months ago #8133

  • phifa
  • phifa's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0
Great, this worked for us! Now we get a gray background for the unfilled space. Is there any way to set it to white?

Thanks.

Regards
Philipp
The topic has been locked.

Fit PDF to screen by width or height 3 years 2 months ago #8134

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 754
  • Karma: 20
  • Thank you received: 55
By change back_color in PDFReader.PDFOpen and PDFReader.PDFSetView
The topic has been locked.

Fit PDF to screen by width or height 3 years 2 months ago #8135

  • phifa
  • phifa's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0
Worked. Thanks
The topic has been locked.
  • Page:
  • 1
Powered by Kunena Forum