-
Feb 18th, 2018, 06:40 PM
#1
Thread Starter
New Member
[RESOLVED] need hwlp with creating pdf files
hello everyone,
I am a mechanical student who had additional course of visual basic. so i have very basic knowledge of vb. Now I am on training in a company which makes 3d printed stuff. I created an application to help the company with calculation of cost and material to be used depending on the design of product. My application shows the output in labels on the form iteself. I wanted to print that information to pdf file so we can share that file with customers and save the data. I was looking to create a one page pdf file that has company logo and name and a picture of product (imported from form) and the calculated values in it. I cannot figure out how to accomplish that. any help is appreciated.
-
Feb 18th, 2018, 07:38 PM
#2
Re: need hwlp with creating pdf files
Originally Posted by hobby
I am a mechanical student
I assume that you mean that you're a mechanical engineering student, but a mechanical student might be cool.
As for the issue, there are a number of ways that you could go about it.
1. You could build and save a PDF file yourself using a .NET component that understands the internal workings of the PDF format. There would be a number of options and iTextSharp is a commonly-used free one.
2. If you have Microsoft Word installed then you could use Office Automation to create a Word document and then use Word to save that as a PDF file.
3. If you have a PDF printer driver installed then you can use a PrintDocument to print from your app as you would to a regular printer, selecting the PDF printer driver as the printer.
-
Feb 18th, 2018, 07:43 PM
#3
Thread Starter
New Member
Re: need hwlp with creating pdf files
I would like to use Microsoft word as it will be available in my office aswell. However, I do not know how to export data to word file and place it in proper layout. I need help with that.
Thanks
and yes I meant Mechanical Engineering student
-
Feb 18th, 2018, 08:19 PM
#4
Re: need hwlp with creating pdf files
I'm far from an expert when it comes to Office Automation so I'm not even going to try. I'd probably suggest that you use the Thread Tools menu to mark this thread Resolved, given that you have been provided with the general mechanism by which you can create a PDF file, then create a new thread with a title and post that specifically reflects the fact that you want to use Word Automation to create a PDF file. That will give you the best chance of getting the people most able to help to view your thread.
It might not be a bad idea to actually create a Word document with the layout you want and then include a screenshot of that.
That said, you should probably do some research here and elsewhere on the web on automating Word as you may well be able to find all - or at least much of - the information you need for yourself. You can then ask more specific questions if you encounter issues along the way.
Last edited by jmcilhinney; Feb 18th, 2018 at 08:24 PM.
-
Feb 18th, 2018, 08:28 PM
#5
Thread Starter
New Member
Re: need hwlp with creating pdf files
Thanks for the suggestion. I will definitely look into it.
-
Feb 19th, 2018, 04:22 AM
#6
Re: [RESOLVED] need hwlp with creating pdf files
You can create a Word template (.dot or .dotx) with all your fixed content - company logos etc - and then populate it with your data. Tables are very handy for getting the content in the right place and you can also use bookmarks for non-tabular data. Include the tables and bookmarks in your template and just drop the data into them using Word automation. I would give you code examples but all mine are in VB6!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|