pdfBox - contentStream.concatenate2CTM full documentation parameters

白昼怎懂夜的黑 提交于 2019-12-25 02:31:15

问题


jsf 2.1 / pdfbox

Im tring to generate landscape pdfbox pdf and draw some strings to its contents but I didnt find any full specification about concatenate2CTM method.

Does anyone have some full information about the concatenate 2CTM parameters

I have only this but does not help me because I dont know what value I must enter.

what means a...f operator ???


回答1:


This directly adds a cm operation to the content stream in question. Thus, you find those values a..f specified in the PDF specification ISO 32000-1:

a b c d e f cm Modify the current transformation matrix (CTM) by concatenating the specified matrix (see 8.3.2, "Coordinate Spaces"). Although the operands specify a matrix, they shall be written as six separate numbers, not as an array.

(Table 57)

In section 8.3.3 Common Transformations you'll find some basic transformations: translations, scalings, rotation, and skews. You'll want to use a rotation and probably also a translation.

Section 8.3.4 Transformation Matrices then discusses the mathematics of transformation matrices. Especially it shows that a..f actually denote the transformation described by the matrix

┌ a b 0 ┐
│ c d 0 │
└ e f 1 ┘

operating on the plane of vectors [ x y 1 ] by right-multiplication.



来源:https://stackoverflow.com/questions/21334782/pdfbox-contentstream-concatenate2ctm-full-documentation-parameters

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!