简体   繁体   English

iText:使用投影变换添加图像

[英]iText: add images with projective transform

I'm trying to add an image to a PDF using iText. 我正在尝试使用iText将图像添加到PDF。 This image must be included with a projective transformation. 此图像必须包含在投影变换中。 I was able to find a way to include images with affine transformation but I couldn't find a way to add images that require projective transformation, such as the following example: 我能够找到一种方法来包含具有仿射变换的图像,但是我找不到一种方法来添加需要投影变换的图像,例如以下示例:

before => after 之前 => 之后

Does anyone know if it is possible to do that and how to do it? 有谁知道这样做是否可行以及如何做到?

That's not possible to do using the transformation capabilities of the PDF format. 使用PDF格式的转换功能是不可能的。 As you already found out there are are mechanisms to do affine transforms but that as far as it goes. 正如您已经发现的那样,有一些机制可以进行仿射变换,但就目前而言。 You'll have to process the images before including them in the PDF. 您必须先处理图像,然后再将其包含在PDF中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM