?
Solved

Create PDF from multiple files in Visual Basic

Posted on 2009-02-20
8
Medium Priority
?
729 Views
Last Modified: 2013-11-10
Hello.

I would like to write a Visual Basic 6 procedure equivalent to "create PDF from multiple files" in Adobe Acrobat Professional. This procedure will have to collect several files (not necessarilly the same format), convert them to PDF in given order and save the PDF to a single file (also specified programatically). Does anybody have any experience with this?
0
Comment
Question by:sandio
  • 3
  • 3
  • 2
8 Comments
 
LVL 18

Expert Comment

by:mdougan
ID: 23691740
VB6 doesn't have any built-in support for creating PDF files.  There are two approaches you can take.  I believe that Adobe made an OCX that will allow you to create PDF files, so, you can purchase that if you wish.

Or, you can get a PDF "virtual printer" driver.  Adobe makes one, and there is also one called PDF995.  When this printer driver is defined, you can programatically select it as your printer, then "print" to it, and whatever you print to it is saved as a PDF file.  Then, in your code, you'd have to figure out how to go about printing the various files you have as a single print job.
0
 
LVL 46

Expert Comment

by:aikimark
ID: 23699588
I'm annoyed with the PDF995 nag process.  Look at Bullzip as another virtual printer device that creates PDFs.
0
 
LVL 18

Expert Comment

by:mdougan
ID: 23700289
Yea, the nag process is really bad... but, that's what we can expect if we're too cheap to pay the $10 to register it :-)  (I haven't paid it either)

Sandio, you may already own Adobe Acrobat, and if you do, you probably have an Adobe "virtual" PDF printer driver installed on your system.  So, check for that first.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 46

Expert Comment

by:aikimark
ID: 23700596
@sandio

mdougan means that you might have the full Adobe Acrobat package that allows you to create/edit PDF files.  This is different than having the (free) Adobe Reader.

free bullzip software home page:
http://www.bullzip.com/products/pdf/info.php

Note: I've used bullzip and have been happy with its performance and features.
0
 

Author Comment

by:sandio
ID: 23700782
Hi everybody,

I already use Adobe Acrobat Professional, and have figured out how to print from VB directly to Adobe PDF printer without prompting the user to enter the filename. What I would like to do is to join different files into a single file without having to run Acrobat. Any ideas about that?
0
 
LVL 18

Expert Comment

by:mdougan
ID: 23700830
Join different PDFs that have already been created?  I was suggesting that you open each file in VB then print them to a single PDF using the virtual PDF printer in a single print job, which would then join them together.

But, if your files are not text or doc files, but already in PDF format, then I don't think that approach would work.

If you have Acrobat Professional, they should have an SDK available to you.  You would reference their DLL and that would give you an object library that you could use to open, edit, create new PDF files.  I don't know the specifics for coding this, though, as I've never used it.  Check out your Adobe Acrobat Professional documentation for any references to an SDK or an API.

Thanks, aikimark, for the reference to bullzip... I'll check it out!
0
 

Author Comment

by:sandio
ID: 23880160
I'm waiting for reply from Adobe - I have already studied the SDK and tried the advice in it, but it just doesn't work. Even the Java batch procedure that is described in their SDK doesn't work.
0
 

Accepted Solution

by:
sandio earned 0 total points
ID: 24512222
I found a perfect solution for scanning directly to PDF, and merging different files into a single PDF as well. It's Cyansoft's Twain OCX Control. Thank you for your ideas.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Progress

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question