Skip to main content
harmoniium
Known Participant
May 10, 2019
Question

How to open Acrobat Pro DC in Scan Mode from VB.NET

  • May 10, 2019
  • 6 replies
  • 4301 views

Our company has upgraded to Acrobat Pro DC from Adobe Pro X and the following line of code no longer functions to open Adobe in Scan mode:

AdobeAcro.MenuItemExecute("Scan")

Can someone direct me to help files for coding with Acrobat Pro DC with VB.NET?  

Thank you,

Anthony

This topic has been closed for replies.

6 replies

Legend
June 6, 2019

the SDK is free to download. There are no tools that I can think of.

harmoniium
Known Participant
May 31, 2019

I now have DC installed on my machine so I can actively work with it.  I see that the menu items are gone and I understand that my code as it worked with X will not work with DC.  I am trying now to open DC from my application so that it is connected to my application so when a file is scanned through the DC interface it will be stored in my system.  Does this make sense?  

This was my code:

           Dim sPDFFileName As String = Path.GetTempFileName.ToLower.Replace(".tmp", ".pdf")

            AdobeAcro.MenuItemExecute("Scan")

            AVDoc = CType(AdobeAcro.GetActiveDoc, Acrobat.AcroAVDoc)

            If AVDoc IsNot Nothing Then

                If AVDoc.IsValid Then

                    'continue

                    PDDoc = CType(AVDoc.GetPDDoc, Acrobat.AcroPDDoc)

                    m_PDFPageNumbers = PDDoc.GetNumPages

                    PDDoc.Save(1, sPDFFileName)

                    PDDoc.Close()

                End If

                AVDoc.Close(CInt(True))

            End If

            AdobeAcro.CloseAllDocs()

            AdobeAcro.Exit()

            KillAdobe()

            If File.Exists(sPDFFileName) Then

                'open it for editing

                Dim pInfo As New ProcessStartInfo

                'Start the correct version of acrobat from the existing path

                pInfo.FileName = StartUp.DetectAcrobat

                pInfo.Arguments = "/A ""zoom=45&pagemode=thumbs"" """ & sPDFFileName & """"

                launchProcess = New Process

                launchProcess = Process.Start(pInfo)

                launchProcess.WaitForExit()

                ' Other processing before returning sPDFFileName to the calling object.

            End If

So, I wonder if I can open DC from my application in a similar fashion so whatever is scanned is returned to my application.

Thank you,

harmoniium
Known Participant
June 4, 2019

Is there a way to open an instance of Acrobat DC from a .NET application with the intention of scanning a document and saving said document to the .NET application?   The idea is to keep the scanning within our application, but use Acrobat as the scan tool.

Thank you

lrosenth
Adobe Employee
Adobe Employee
June 4, 2019

No.

Legend
May 29, 2019

The Acrobat SDK contains supported interfaces. There isn’t one to do this. Notice that you were executing a menu item - it was never a special function to enter scanning from your app. There just happened to be a Scan menu item, which you found useful. Now notice most menus are removed in DC. That’s why it no longer works.

harmoniium
Known Participant
May 29, 2019

So the company has moved to DC from X and our application with X opened Adobe ready to scan.  Are you saying that this method was never intended to be included in X or that it was an accident? 

Is there documentation on how to code for DC in .NET code?  Would you send me more information so I can work on a solution?

Thank  you,

Legend
May 10, 2019

Pretty sure no. It’s just sheer luck that there was once a menu item that entered scan mode.

New Participant
October 22, 2020

With the Scan menu gone from Acrobat DC why is MenuItemIsEnabled("Scan") still returns a True?

 

A False return value would make more sense since there is no menu item with that name anymore.

 

Regards,

Peter

 

Bernd Alheit
Community Expert
Community Expert
October 22, 2020

The menu item "Scan" exists in Javascript. It is the name for following entry:

 

File > Create > PDF from Scanner

Legend
May 10, 2019

Items removed from the menu have no replacement.

harmoniium
Known Participant
May 10, 2019

This line of code opens an instance of Acrobat in Scan mode.  Is there a way to do that with DC?