Question Print to PDF or Ms word

crimzon

New member
Joined
Mar 1, 2014
Messages
2
Programming Experience
3-5
Hi guys,

I am new to VB.Net and I've installed VS 2013.

I made a simple window form which takes two numeric parameters from user and after pressing calculate button result will show in 4 different Text Item based on Sum, Multiplication, Divide and Subtraction.

Now i want your help to create another Print button that would print result [4 Text Items] to PDF and Word file along with the desired logo, after pressing Print button it should also ask the user where to save your file.


Thanks in advance
 
First of all, it's important to clarify exactly what "print" means. Saving to a file is not printing. Printing means going through a printer driver. There are numerous printer drivers around that produce a PDF but there is no guarantee that any particular user will have one installed. As for Word, I'm not aware of any printer driver that produces a Word document. So, the first question is whether you actually want to print at all or just save to a file.

First, let's consider the PDF. While many will, not everyone is going to have a PDF printer driver installed. Do you want to force all your users to install one or do you want to include PDF creation in your app? If you want to go with the latter then you can look at iTextSharp.

As for Word documents, do you want to use DOC or DOCX format? If you want to create a DOC file then the user pretty much needs Word installed and you can use Office Automation to create the file. If you go with DOCX then you can use the Open XML SDK, which you can reference in your project and then have no dependency on Office itself. DOCX is only supported back to Office 2007 though.
 
Save to PDF or MS Word or MS Excel

First of all, it's important to clarify exactly what "print" means. Saving to a file is not printing. Printing means going through a printer driver. There are numerous printer drivers around that produce a PDF but there is no guarantee that any particular user will have one installed. As for Word, I'm not aware of any printer driver that produces a Word document. So, the first question is whether you actually want to print at all or just save to a file.

First, let's consider the PDF. While many will, not everyone is going to have a PDF printer driver installed. Do you want to force all your users to install one or do you want to include PDF creation in your app? If you want to go with the latter then you can look at iTextSharp.

As for Word documents, do you want to use DOC or DOCX format? If you want to create a DOC file then the user pretty much needs Word installed and you can use Office Automation to create the file. If you go with DOCX then you can use the Open XML SDK, which you can reference in your project and then have no dependency on Office itself. DOCX is only supported back to Office 2007 though.


Thank you very much for your reply!
Sorry I meant to save the document in the computer by pressing Save command button. When I press the button it will ask me where to save it in the hard drive.
 
Thank you very much for your reply!
Sorry I meant to save the document in the computer by pressing Save command button. When I press the button it will ask me where to save it in the hard drive.

I'm not really quite sure what you're saying there. Is that just some background information or are you actually asking a question?
 
Back
Top