开发者

Dynamically overlaying vector graphics on a PDF

开发者 https://www.devze.com 2023-01-30 02:29 出处:网络
I have a particular requirement to generate a PDF document 开发者_如何学JAVAwith some dynamic data overlaid on top.

I have a particular requirement to generate a PDF document 开发者_如何学JAVAwith some dynamic data overlaid on top.

That's the general gist. To be clear, I have a fair amount of experience in generating PDFs programatically so I'm not looking for a list of products that can simply churn out PDF. The specifics are:

I have a pre-existing PDF template containing a vector representation of certain regions of the UK. I will be capturing geographical data via a web interface and will need to overlay these data on the PDF as vector graphics (little circles with numbers to be specific).

So, what I'm looking for is some advice on:

  1. How to dynamically write vector graphics to a PDF
  2. Translation of geographical coordinates to vector layer coordinates

Cheers. Steve


iText[Sharp] can handle the vector graphics portion fairly easily with a PdfStamper.

There have been several questions on the itext-questions mailing list about geographic coordinates that should help you on that front as well. Searching your favorite list archive for "geospatial" should turn them up.

I don't think we've added higher-level functions for that sort of thing yet, so you'll have to dig into PdfDictionary, PdfArray, and so forth. Keep a copy of the PDF Reference handy (but you probably already do).

0

精彩评论

暂无评论...
验证码 换一张
取 消