I need to add a table using iTextSharp (or even PDFSharp if it can do it) into an existing PDF template at a particular location in the template. I can edit the existing template with Adobe Designer 7.0. How can I go about doing this? Is there a PlaceHolder analog from Asp.Net which can be used here?
我需要使用iTextSharp(如果可以的话,甚至是PDFSharp)将表添加到模板中特定位置的现有PDF模板中。我可以使用Adobe Designer 7.0编辑现有模板。我该怎么做呢?是否有Asp.Net的PlaceHolder模拟器可以在这里使用?
Keith
1 个解决方案
#1
After some some experimenting, yes, you can do so but with a caveat. First, put a text field down somewhere. In the code, grab the coordinates of where it is. Then build some sort of object to insert there, a table in my case. One caveat is there is no flow, the document will not adjust itself. If your object is too big, it will overwrite (overflow?) what was previously already there. I was hoping for a nice re-flow of what was there, but no dice. I finding that PDFs are a pretty static beast. But I think I'll get it to work for my needs.
经过一些实验,是的,你可以这样做,但需要注意。首先,将文本字段放在某处。在代码中,抓住它所在的坐标。然后构建一些插入那里的对象,在我的情况下是一个表。一个警告是没有流量,文件不会自行调整。如果你的对象太大,它会覆盖(溢出?)以前已存在的东西。我希望有一个很好的重新流动的东西,但没有骰子。我发现PDF是一个非常静态的野兽。但我想我会让它满足我的需求。
#1
After some some experimenting, yes, you can do so but with a caveat. First, put a text field down somewhere. In the code, grab the coordinates of where it is. Then build some sort of object to insert there, a table in my case. One caveat is there is no flow, the document will not adjust itself. If your object is too big, it will overwrite (overflow?) what was previously already there. I was hoping for a nice re-flow of what was there, but no dice. I finding that PDFs are a pretty static beast. But I think I'll get it to work for my needs.
经过一些实验,是的,你可以这样做,但需要注意。首先,将文本字段放在某处。在代码中,抓住它所在的坐标。然后构建一些插入那里的对象,在我的情况下是一个表。一个警告是没有流量,文件不会自行调整。如果你的对象太大,它会覆盖(溢出?)以前已存在的东西。我希望有一个很好的重新流动的东西,但没有骰子。我发现PDF是一个非常静态的野兽。但我想我会让它满足我的需求。