Resize problem on PDFViewDual - 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: Resize problem on PDFViewDual

Resize problem on PDFViewDual 3 years 5 months ago #9050

  • barwoź
  • barwoź's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hello
i have a problem with PDFViewDual, actually i can't resize my pdf file. After pinch screen aplication quiclky moves to center of page and then resize.
there is a problem with page slider too - page not refresh after slide and doesn't move to that page before touch screen.
Please help me, i haven't got any idea how to solve it.
code:
import android.content.Context;
import android.util.Log;
import android.view.MotionEvent;

import com.radaee.pdf.Document;
import com.radaee.reader.PDFLayoutView;
import com.radaee.view.PDFView;
import com.radaee.view.PDFView.PDFPos;
import com.radaee.view.PDFView.PDFViewListener;
import com.radaee.view.PDFViewCurl;
import com.radaee.view.PDFViewDual;
import com.radaee.view.PDFViewHorz;
import com.radaee.view.PDFViewVert;

public class PDFDoc extends PDFViewDual{

	private static final String TAG = "PDFDoc";


	public PDFDoc(Context context) {
		super(context);
		
	}

	public Document viewGetDoc() {
		return m_doc;
	}
	
@Override
public boolean vMovingFinished() {
	Log.i(TAG,"vMovingFinished");
	return super.vMovingFinished();
}

public boolean vTouchEvent(MotionEvent event) {
	
	return super.vTouchEvent(event);
}
	public void setViewListener(PDFViewListener listener) {
		m_listener=listener;
		
	}
	public int ilestron() {
		return m_doc.GetPageCount();
		
	}

	public PDFPos getPosition() {
		PDFPos pos=vGetPos(0,0);
		
		
		if(pos!=null)
		{
			Log.i(TAG, "getPostion"+m_h+" "+m_w+" "+vGetX()+" "+vGetY());
		
		pos.x=-vGetX();
		pos.y=-vGetY();
		if(pos.y<0)
			pos.y=0;
		pos.pageno=vGetPage((int)-pos.x, (int)-pos.y);

		}
		return pos;
	}
	public PDFPos getRealPostion() {
		PDFPos pos=vGetPos(0,0);
		return pos;
	}
	public int getWidthLayer()
	{
		int szerokosc = (int)m_doc.GetPageWidth(0);
		return szerokosc;
	}
	 public void vScrollPDF(int newX, int newY){
		 	
			Log.i(TAG,"vScrollPDF"+newX+" "+newY);
			if(m_scroller != null){

				m_scroller.setFinalX(newX);
				m_scroller.setFinalY(newY);
				
				m_scroller.computeScrollOffset();
				
			}		
		}
	 public int get_scrollerX()
	 {
		 return m_scroller.getCurrX();
	 }
	 public int get_scrollerY()
	 {
		 return m_scroller.getCurrY();
	 }
	/*public  PDFPos vSetPos(PDFPos pos, float x, float y) {
		// TODO Auto-generated method stub
		
		pos.x = x;
		pos.y = y;
		return pos;
	}*/

}

Please Log in or Create an account to join the conversation.

Resize problem on PDFViewDual 3 years 5 months ago #9063

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • Thank you received: 65
Hi,
I have take a look at your code, can you give us more info about your problem?
What is your target? What do you wanna create with this code?

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum