Universal Document Converter
Product Overview
Download
Purchase
Tutorials
Developer Solutions
Support Service
About fCoder Group


      Site search
   


      Video tutorial
Show tutorial


Main page>Developer Solutions>COM Examples

Get List of Available Page Formats Using Visual Basic.NET


Universal Document Converter is virtual printer software that saves any document you print as an image file. Below is a source code example that can help you to accomplish your task with Universal Document Converter. Please let us know if you cannot find the solution you need.

' 1) Install Universal Document Converter 3.0 or above on your PC
'
' 2) Open your project in Microsoft Visual Basic.NET
'
' 3) In Visual Basic main menu press "Project->Add Reference..."
'
' 4) In "Add Reference" window press "Browse..." button and select
'    UDCWrapper.dll file. By default this file should be in folder
'    "C:\Program Files\Universal Document Converter\SDK\bin"
'
' Universal Document Converter COM interface is ready to use now!

Private Sub GetPageFormatsList()

  Dim UDCPrinter As New UDCWRAPPERLib.Printer
  Dim UDCProfile As UDCWRAPPERLib.Profile
  
  Dim StringsArray As Object
  Dim nFormates, i As Long
  Dim Message, Break As String

  UDCPrinter.PrinterName = "Universal Document Converter"
  Set UDCProfile = UDCPrinter.Profile(UDCPrinter.DefaultProfile)

  StringsArray = UDCProfile.PageFormatesList
  nFormates = UBound(StringsArray)

  Break = Chr(13) + Chr(10)

  For i = 0 To nFormates
    Message = Message & (i + 1) & ". " + StringsArray(i) + Break
  Next i
  
  Call MsgBox(Message, vbOKOnly, "List of Available Page Formats")

End Sub



Related topics
Popular pages
Popular solutions


© 2001-2008 fCoder Group, Inc. About fCoder Group | Privacy Policy | Site Map