Knowledge Base - Convert PDF coordinates to screen coordinates and vice versa.

With these set of methods you can convert points and rects.


PDF coordinates (points): origin point in the bottom-left corner and y ascending moving up
<->
Screen coordinates (pixels): origin point in the top-left corner and y ascending moving down.

 

Screen to PDF Point:

Android:
RadaeePDFManager.getPDFCoordinates(int x, int y);

iOS:

- (CGPoint)pdfPointsFromScreenPoints:(int)x :(int)y

Screen to PDF Rect:

Android:
RadaeePDFManager.getPDFRect(int left, int top, int right, int bottom)

iOS:

- (PDF_RECT)pdfRectFromScreenRect:(CGRect)screenRect;

PDF to Screen Point:

Android:
RadaeePDFManager.getScreenCoordinates(int pageno, float x, float y)

iOS:

- (CGPoint)screenPointsFromPdfPoints:(float)x :(float)y :(int)pageNum;

PDF to Screen Rect:

Android:
public String getScreenRect(int pageno, float left, float top, float right, float bottom)

iOS:

- (CGRect)screenRectFromPdfRect:(float)left :(float)top :(float)right :(float)bottom :(int)pageNum;

Applies To

RadaeePDF SDK for Android, RadaeePDF SDK for iOS

Details

Created : 2020-09-03 10:05:46, Last Modified : 2020-09-03 10:29:39

Order history

Login to handle your order history.