Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 101785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:50:17+00:00 2026-05-11T00:50:17+00:00

I am using VB.Net WinForms. I would like to call the Adobe Reader 9

  • 0

I am using VB.Net WinForms. I would like to call the Adobe Reader 9 ActiveX control to print some PDFs. I have added the ActiveX control to the VS toolbox (the dll is AcroPDF.dll, the COM name ‘Adobe PDF Reader’. After some experiment the following code works.

Dim files As String() = Directory.GetFiles(TextBoxPath.Text, '*.pdf', SearchOption.TopDirectoryOnly)  Using ActiveXPDF As New AxAcroPDFLib.AxAcroPDF      Me.Controls.Add(ActiveXPDF)     ActiveXPDF.Hide()      For Each filename As String In files          ActiveXPDF.LoadFile(filename)         ActiveXPDF.printAll()          'Begin Yukky Hack    '           Dim endTime As Date = DateAdd(DateInterval.Second, 20, Now)         Do While Now < endTime             My.Application.DoEvents()         Loop          'End Yuk   '      Next  End Using 

Without the Yuk bit this will only print some of the PDFs, it seems that the End Using statement is calling dispose on the control before it has finished printing.

Therefore it seems the call to printAll is non-blocking but I can’t find a callback or status property I can query to see if the print spooling has been completed. I am missing a property/method or is there a more elegant (and more responsive) work around?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:50:17+00:00Added an answer on May 11, 2026 at 12:50 am

    Using this method to print multiple documents is not going to work good as you found.

    Having it work is quite tricky but here is a general description of the solution.

    I use System.Diagnostics.Process to print using myProcess.StartInfo.Verb = ‘Print’ Then I check the Status and State of printer queue in two steps to make sure that the printing is ready enough to be able to print the next document. Use WMI and ManagementObjectSearcher to enumerate the printer info using ‘SELECT * FROM Win32_Printer’. The logic is that I try to see if the spooling is started before continuing to print the next one.

    See http://msdn.microsoft.com/en-us/library/aa394363.aspx for the Win32_Printer WMI class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 107k
  • Answers 107k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need to look into maintainer mode - that should… May 11, 2026 at 9:08 pm
  • Editorial Team
    Editorial Team added an answer An instance of an anonymous type with no key properties… May 11, 2026 at 9:08 pm
  • Editorial Team
    Editorial Team added an answer Wotsit.org has 4 documents about the MOV file format. May 11, 2026 at 9:08 pm

Related Questions

I am running Crystal Reports Basic for Visual Studio 2008. I would like to
I have created a mutli-column combobox in VB.net 2008 using windows forms 2.0. I
I want to make a text box in .NET glow yellow, and then fade
I have been a web developer for my entire development career. Nearly 100% microsoft

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.