Write to a PDF File From VB


Application Security Testing: An Integral Part of DevOps

Environment: Visual Basic 6

When it comes to generating reports in software systems, most users want these reports to be printed as an Adobe Portable Document Format (PDF) file, which is is normally a read-only format so that users can't change the contents of it. Most customers will ask that your report be printed in PDF format.

From this example, you do not have to install any third-party controls to create the PDF file.This example converts a text file and creates a PDF file.


Download source code - 6 Kb
Download demo project - 13 Kb


  • When I try to close the PDF, it asks to be save.. Why.

    Posted by Catharinus van der Werf on 01/12/2013 01:23am

    Hello my friends I want to use the pdf from Dinesh Asanka. Very beautiful in its simplicity. But when I close a pdf that is created with the tool from Dinesh, it asked wheter or not I want to save it. Why does it not simply close the pdf???? Anybody?? Thanks in advance Catharinus

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As all sorts of data becomes available for storage, analysis and retrieval - so called 'Big Data' - there are potentially huge benefits, but equally huge challenges...
  • The agile organization needs knowledge to act on, quickly and effectively. Though many organizations are clamouring for "Big Data", not nearly as many know what to do with it...
  • Cloud-based integration solutions can be confusing. Adding to the confusion are the multiple ways IT departments can deliver such integration...

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.