joker77 Posted April 30, 2008 Posted April 30, 2008 Hi there I'm in the process of building a web application, one part of which I will have to send a prefilled document to the User for them to print. It will have stuff like the name and address etc, so that they can just print it off and stick it in an envelope. What are the best options to achieve this? I've looked into iTextSharp, which looks fine for generating PDF files. But I'll need a 'master' PDF with fields in it that I can search + replace, and I'm not sure at the moment how to do this. If there's an alternative to a PDF that is cross-platform and easy to create, let me know, thanks Quote What if the Hokey-Pokey IS what it's all about?
Nate Bross Posted May 2, 2008 Posted May 2, 2008 Not sure exactly what you want to do; however, you could possibly use a template HTML file (designed for 8.5/11, or whatever you need). <html> <div> {FirstName} {MiddleInit} {LastName} <br /> {StreetAddress} <br /> {City} {StateCode}, {ZipCode} </div> </html> Then do a find/replace for all the values... maybe not the best option, but it allows the user to use their browsers print functionallity, print to PDF, printer, or Microsoft XPS document, etc. String.Replace("{FirstName}",YourFirstNameVariable); String.Replace("{LastName}",YourLastNameVariable); Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.