Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

What if the Hokey-Pokey IS what it's all about?
Posted

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);

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...