Dynamically overlaying vector graphics on a PDF
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:
- How to dynamically write vector graphics to a PDF
- 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).
精彩评论