android - How to draw a path on pdf canvas by using itext pdf? -


i implementing pdf editing application using itextpdf. added text pdf , drawing name on android system canvas using canvas.drawpath() method.like want draw names on pdfcanvas possible?.

i tried of example drawing curves , rectangle on pdf canvas not giving exact solution.for drawing curves on pdf canvas using "pdfcontentbyte".in class found of methods

curvefromto(x1,y1,x3,y3) curveto(x2,y2,x3,y3) curveto(x1,y1,x2,y2,x3,y3)

in methods using curvefromto() after saving it's giving mirror path not original path.

means if draw pdf on android canvas rotating mirror image.

is possible draw path on pdf file.and there method canvas.drawpath();

first things first: there no canvas.drawpath() method in itext.

now rest of question: there methods draw text on pdf page using low-level functionality , methods draw text using high-level functionality.

at lowest level, 1 use, sequence of begintext(), setfontandsize(), settextmatrix(), showtext() , endtext() methods. called "text object".

at higher level, 1 replace settextmatrix() , showtext() single showtextaligned() method.

at higher level, 1 replace complete sequence single columntext.showtextaligned() method.

at highest level, on create columntext object, define rectangle column, add objects such paragraph, pdfptable,... column , execute go() method.

however: making major mistake when say:

after saving it's giving mirror path not original path.

means if draw pdf on android canvas rotating mirror image.

apart bad english, ignoring iso-32000-1. reading iso-standard, you'll discover making wrong assumptions coordinate system in pdf. in newly created pdf, origin of coordinate can found in lower-left corner. x access extends right. y access extends upwards.

android uses different coordinate system. need make sure transform coordinates when converting android coordinates pdf coordinates.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -