Adjust screen in pdfViewer

I have an application that considers PDF files, the problem is that the pdf is out of the screen, and if I zoom out, it is not focused.

I am using the code from this SO answer.

Reading PDF with PDFViewer

image1enter image description here

Any ideas?

thank

+2
android screen resize pdf-viewer
Jun 29 '12 at 9:17
source share
2 answers

Finally, I used the code from APV PDF Viewer , which works well.

0
Nov 30 '12 at 12:11
source share

To increase the size of the PDFVIEWER.jar view, create an ABSTRACT CLASS or just copy the code HERE

For me, I call the class "PdfViewerActivities"

To get the required amount of zoom, please refer to the logarithm that starts when you click the zoom icon button on the PDF page

"PDFVIEWER ST = ', p. 1, magnification: 0.435'"

In a private static final float, STARTZOOM = 0.435f; change the value based on the desired scaling value

and then extend the class to your main class

public class PDF_Reader extends PdfViewerActivities{ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public int getPreviousPageImageResource() { return R.drawable.left_arrow; } @Override public int getNextPageImageResource() { return R.drawable.right_arrow; } @Override public int getZoomInImageResource() { return R.drawable.zoom_in; } @Override public int getZoomOutImageResource() { return R.drawable.zoom_out; } @Override public int getPdfPasswordLayoutResource() { return R.layout.pdf_file_password; } @Override public int getPdfPageNumberResource() { return R.layout.dialog_pagenumber; } @Override public int getPdfPasswordEditField() { return R.id.etPassword; } @Override public int getPdfPasswordOkButton() { return R.id.btOK; } @Override public int getPdfPasswordExitButton() { return R.id.btExit; } @Override public int getPdfPageNumberEditField() { return R.id.pagenum_edit; } } 

Hope this helps everyone ^ _ ^ v

+1
May 03 '13 at 7:55
source share



All Articles