Save pdf template file to new pdf file after edit text in asp.net

这一生的挚爱 提交于 2019-12-24 05:55:17

问题


I have pdf file that contains some text that I want to replace with another piece of text (and save the file with new name.)
Can I do that with iTextSharp?
And how?
Can you give me guide for it?


回答1:


Generally speaking this is not possible. Check out this FAQ question which discusses the issue. The FAQ addresses iText (the Java version project from which iTextSharp was derived) but applies to iTextSharp as well.

Keep in mind the comments on the (linked) example:

/* This is only a partial answer. It's a quick and dirty method showing how to
 * change a stream inside a PDF. Obviously, you'll have to detect words that are
 * stored in Form XObjects too, and you can seriously screw up the layout when
 * you manipulate the content stream as is done in this example.
 */


来源:https://stackoverflow.com/questions/958478/save-pdf-template-file-to-new-pdf-file-after-edit-text-in-asp-net

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