Results 1 to 6 of 6

Thread: [RESOLVED] need hwlp with creating pdf files

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    3

    Resolved [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.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: need hwlp with creating pdf files

    Quote Originally Posted by hobby View Post
    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    3

    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

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    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.

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    3

    Re: need hwlp with creating pdf files

    Thanks for the suggestion. I will definitely look into it.

  6. #6
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    750

    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
  •  



Click Here to Expand Forum to Full Width