Results 1 to 19 of 19

Thread: PDF Component Recommendation

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    PDF Component Recommendation

    Hello all,
    My company has a procedure database. The procedures only apply to certain plants that we have. I've written a program to keep track of whcih procedures are attached to which plant. The program that we were using to do this previously was using the reporting feature of Access. We had to make the report, then save it as a PDF. For 15+ plants, this was time consuming. This is where my program came in. It was designed to handle all of this printing autmatically, but I don't have a way to make and export that report anymore.

    I need to be able to make a report similar to Crystal Reports but export it in a PDF. I can code the report manually if need be, so that I don't have specific sections and divisions displaying data based on the database like Crystal Reports does, but rather I have a form like a Microsoft Word macro that I could write and would input the data into the software.

    Anyone have any good suggestions for a good control or coding references?

  2. #2
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    Re: PDF Component Recommendation

    There is a VB6 PDF control that you can add to any of your VB6 applications. Have you tried using it to do anything with PDF files? It's a little nebulous, but please look it over. I have found it to be rather flexible, once you get the hang of it.
    Doctor Ed

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: PDF Component Recommendation

    you can print to any pdf printer driver
    i use CutePdf, but pdfcreator allows more control
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: PDF Component Recommendation

    That's true westconn. As of now that might work, but if I ever decide to run this on anyone else's computer, that might be a problem. I like to keep my projects as self-contained as possible.

    Code_Doc:
    I haven't tried using it at all. What's the component name? Where can I learn about it?
    Last edited by drag0n_45; Jul 18th, 2008 at 09:10 AM.

  5. #5
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    Re: PDF Component Recommendation

    The control name is AcroPDF1. It's near the top of the VB6 components list (AcroPDF.dll).

    With a little effort, I've been able to configure it to have the look and feel of the Acrobat Reader.
    Doctor Ed

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: PDF Component Recommendation

    Am I missing something?Name:  untitled.JPG
Views: 253
Size:  42.2 KB

  7. #7
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    Re: PDF Component Recommendation

    Quote Originally Posted by drag0n_45
    Am I missing something?Name:  untitled.JPG
Views: 253
Size:  42.2 KB
    That's it. Whale of a long control description.
    Also, search this site for PDF. For awhile there were lots of people playing with this beast.
    Doctor Ed

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: PDF Component Recommendation

    I checked out that PDF control. It looks like it's just for reading and displaying PDF's, not for making them. I might need to do that PDF printer driver thing, but then I'd have to specify each file name in the printer's open file dialog and the printer each time. Does anyone know of a way to create PDF's not just view then, or maybe there's a way to automate that printing process?

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: PDF Component Recommendation

    I found this and installed it - it's retardedly complicated. This might take awhile for me to figure out. If anyone's ever heard anything or used the library let me know....

  10. #10
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    Re: PDF Component Recommendation

    Quote Originally Posted by drag0n_45
    I found this and installed it - it's retardedly complicated. This might take awhile for me to figure out. If anyone's ever heard anything or used the library let me know....
    Creating PDFs is not going to be easy for numerous reasons, primarily that the file format is somewhat proprietary. Adobe invented it and I'm sure you would understand their position on the issue. The VB6 control allows a read of the file and a save plus numerous other display options that allow you to mimic the Acrobat Reader within your apps.

    Remember that Adobe also sells The Distiller, and that builds the PDF. Any software written to do the same would be a competitor.
    Doctor Ed

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: PDF Component Recommendation

    Ah true. Thing is, I'm not trying to read them - I'm trying to create them. I'm not sure if there's an easier way to do this though. I currently am using an Access database with reports to display the data. I run the report on various sets of data and export the result to a PDF. This process needs to happen about 15-20 times with each revision of a company procedure. This take about 30minutes to a half hour. I'm trying to port the software over to Windows only and continue to make the PDF reports. This program will primarily be run on my computer, so dependancies and distribution won't be a problem. Maybe CR has some kind of PDF exporter?

  12. #12
    Member
    Join Date
    Dec 2007
    Posts
    57

    Re: PDF Component Recommendation

    The PDF format is 'open' - ie. Adobe have published and documented the format to third-party developers and to the public.

    But, even so, it's an extremely complex file format and creating a full-featured PDF 'manually' (ie. sequentially writing data to disk) would be near impossible in VB6.

    My suggestion is that you can create PostScript content, which uses a much simpler syntax, and invoke Adobe's Distiller application programatically to convert PS into PDF.

  13. #13
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: PDF Component Recommendation

    One option is to install Primo PDF and then use standard print methods to print to the Primo PDF printer.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  14. #14

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: PDF Component Recommendation

    adhijit, That would work, except that with any PDF printer that I've seen, the printer driver prompts where it would like the PDF file created. In a situation such as mine, this would be impractical, as there would be a prompt for each and every one of the 15 PDF files. Also, the user could delete that printer and my program would be screwed. I may be able to go with reinholdmesner's method...need to look into it further.

  15. #15
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: PDF Component Recommendation

    Quote Originally Posted by drag0n_45
    adhijit, That would work, except that with any PDF printer that I've seen, the printer driver prompts where it would like the PDF file created. In a situation such as mine, this would be impractical, as there would be a prompt for each and every one of the 15 PDF files. Also, the user could delete that printer and my program would be screwed. I may be able to go with reinholdmesner's method...need to look into it further.
    Would it be possible to avoid this prompt by using an API call?

    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  16. #16

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: PDF Component Recommendation

    Possible. You mean monitor the open windows and when the print dialog comes up automatically fill in the values and hit ok? That is probably possible, but then what if someone deleted the PDF printer not knowing what it was? That would screw up this whole idea.

  17. #17
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: PDF Component Recommendation

    with pdfcreator you can automate the saving process, by specifing the file name to a registry key and some option to save to that name, without keypress, also all the VB source code is available
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  18. #18

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: PDF Component Recommendation

    Excellent. I'll look into pdfcreator then. I realized that the company already had some pre-made templates for the form I'm trying to create. Our scanner can scan into PDF. Does PDF creator load and edit PDF files? (Or at the very least plop some text over the pdf file for printing?)

  19. #19
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: PDF Component Recommendation

    Does PDF creator load and edit PDF files? (Or at the very least plop some text over the pdf file for printing?)
    not as far as i know, you would have to this yourself before printing to the pdf driver, or modify the pdfcreator source code,
    i have downloades the pdfcreator, but not really done anything with it as i normally use cutepdf
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

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