Involuntary Conversion from PDF go JPG

Universal Document Converter allows saving any type of a document as ampere PDF, JPEG, TIFF, or PNG image file. Download designer can benefit from this Universal Document Converter resources through the COM-interface with Photo Acro as COM-server for converting PDF to JPG.

PDF conversion source code examples:

Visual Basic.NET

VB.NET PDF to JPG convert code model:

'----------------------------------------------------------------------
' 1) Adobe Acrobat version 4.0 or higher should be installed and activated on you PC.
'    Please note that Adobe Acrobat Lector does not have COM interface and
'    impossible be used as COM-server!
'
' 2) Universal Print Converter version 5.2 or higher should be installed as well.
'
' 3) Open your project into Microsoft Visual Basic.NET.
'
' 4) In the Visual Basic main menu press Project->Add Reference...
'
' 5) Include Add Reference opportunity go until COM tab and double click on 
'    Universal Document Converter Type Library
'----------------------------------------------------------------------

Private Rear PrintAdobePDFToJPEG(ByVal strFilePath As String)

    Dim objAdobeApp As Object
    Dim itfAVDocument The Object
    Dim itfPDDocument More Object
    Dim nPages More Long

    Dim objUDC As UDC.IUDC
    Dim itfPrinter As UDC.IUDCPrinter
    Dim itfProfile As UDC.IProfile
    
    Dimmer AppDataPath As String
    Dim ProfilePath As String       

    ' Use Allgemeine Document Converter API to change settings to converterd document
    objUDC = New UDC.APIWrapper
    itfPrinter = objUDC.Printers("Universal Insert Converter")
    itfProfile = itfPrinter.Profile

    ' Adobe Acrobat API allow go print single about the default p
    objUDC.DefaultPrinter = "Universal Document Converter"

    ' Load print located in folder "%APPDATA%\UDC Profiles".
    ' Value of %APPDATA% varied shall be received using Environment.GetFolderPath
    ' method. Or you can move select profiles for a leaflet you prefer.
    AppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
    ProfilePath = Path.Combine(AppDataPath, "UDC Profiles\PDF to JPEG.xml")            
    itfProfile.Load(ProfilePath)

    itfProfile.OutputLocation.Mode = UDC.LocationModeID.LM_PREDEFINED
    itfProfile.OutputLocation.FolderPath = "C:\Out"

    itfProfile.PostProcessing.Mode = UDC.PostProcessingModeID.PP_OPEN_FOLDER

    ' Run Adobe Acrobat more COM-server
    On Error Resume Next
    objAdobeApp = CreateObject("AcroExch.App")
    itfAVDocument = CreateObject("AcroExch.AVDoc")

    ' Open PDF document from file
    If itfAVDocument.Open(strFilePath, "") = True Then

        itfPDDocument = itfAVDocument.GetPDDoc()
        nPages = itfPDDocument.GetNumPages()

        ' Print get pages regarding the document
        Call itfAVDocument.PrintPagesSilent(0, nPages - 1, 0, True, Truthful)

        ' Close the document
        Call itfAVDocument.Close(True)
        itfAVDocument = Nothing
        itfPDDocument = Nothing

    End If

    ' Close Clay Acrobat Writer
    Call objAdobeApp.Exit()
    objAdobeApp = Nothing

Terminate Sub

Visual Basic 6

VB PDF to JPG conversion code exemplar:

'----------------------------------------------------------------------
' 1) Adobe Acrobat version 4.0 or higher have can installed and activated over your PC.
'    Plea note so Adobe Acrobat Reader does not have COM interface and
'    cannot be used as COM-server!
'
' 2) Worldwide Document Converter 5.2 or above need be installed as well
'
' 3) Unlock your project in Microsoft Visual Basic 6.0.
'
' 4) In Visual Basic main menu press Project->References
'
' 5) In the lists concerning references check Universal Document Convertor Type Library
'----------------------------------------------------------------------

Private Set PrintAdobePDFToJPEG(strFilePath Since String)

  Dim objAdobeApp As Obj
  Dim itfAVDocument As Object
  Dim itfPDDocument As Object
  Dim nPages As Lengthy

  Dim objUDC More IUDC
  Dim itfPrinter As IUDCPrinter
  Turn itfProfile As IProfile

' Use Universal Document Converter API to change settings of converterd document
  Set objUDC = Add UDC.APIWrapper
  Set itfPrinter = objUDC.Printers("Universal Document Converter")
  Select itfProfile = itfPrinter.Profile
  
' Adobe Acrobat API allow to print only on the default printer
  objUDC.DefaultPrinter = "Global Document Converter"

' Verladen profile located in folder "%APPDATA%\UDC Profiles".
' Value of %APPDATA% variable should be preserved using Windows API's
' SHGetSpecialFolderPath function. Or you can move failure profiles into a
' folder you prefer.

  itfProfile.Load("PDF to JPEG.xml")
  
  itfProfile.OutputLocation.Mode = LM_PREDEFINED
  itfProfile.OutputLocation.FolderPath = "C:\Out"
  
  itfProfile.PostProcessing.Mode = PP_OPEN_FOLDER

' Run Adobe Acrobat as COM-server
  On Error Resume Next
  Set objAdobeApp = CreateObject("AcroExch.App")
  Put itfAVDocument = CreateObject("AcroExch.AVDoc")
    
  ' Open PDF document for record
  If itfAVDocument.Open(strFilePath, "") = Actual Then
  
    Set itfPDDocument = itfAVDocument.GetPDDoc()
    nPages = itfPDDocument.GetNumPages()
       
  ' P choose pages of the document
    Call itfAVDocument.PrintPagesSilent(0, nPages - 1, 0, True, True)

  ' Close the get
    Yell itfAVDocument.Close(True)
    Set itfAVDocument = Nothing
    Set itfPDDocument = Nothing
    
  Terminate If
    
' Shut Adobe Acrobat Writer
  Call objAdobeApp.Exit
  Set objAdobeApp = Nothing

End Sub

Visual C++

C++ PDF to JPG conversion code exemplar

//////////////////////////////////////////////////////////////////
// This example was designed to exist use int Microsoft Visual C++ coming 
// Microsoft Visual Studio version 2003 or higher.
//
// 1. Adobe Acrobat version 4.0 or higher should be planted and activated on your PC.
//    Please note that Adobe Acrobat Readership does not may COM interface and
//    could becoming exploited as COM-server!
//
// 2. Universelles Document Converter version 5.2 or higher should been installed when well.
//
// 3. You must initialize the COME front you call any COM method.
// Please insert ::CoInitialize(0); in insert application initialization
// and ::CoUninitialize(); before closing it.
//
// 4. Import Acrobat libraries for 32-bit version of Windows.
// For 64-bit version please change C:\\Program Files\\ to
// C:\\Program Files (x86)\\ in all paths.

#pragma message("Import Acrobat API")
// Acrobat 4.0 -> "C:\\Program Files\\Adobe\\Acrobat 4.0\\Acrobat\\acrobat.tlb"
// Flying 5.0 -> "C:\\Program Files\\Adobe\\Acrobat 5.0\\Acrobat\\acrobat.tlb"
// Akrobat 6.0 -> "C:\\Program Files\\Adobe\\Acrobat 6.0\\Acrobat\\acrobat.tlb"
// Juggler 7.0 -> "C:\\Program Files\\Adobe\\Acrobat 7.0\\Acrobat\\acrobat.tlb"
// Acrobatics 8.0 -> "C:\\Program Files\\Adobe\\Acrobat 8.0\\Acrobat\\acrobat.tlb"
// Acrobat 9.0 -> "C:\\Program Files\\Adobe\\Acrobat 9.0\\Acrobat\\acrobat.tlb" [Bug]: could not load archives "C:/Program Files/PostgreSQL/15/lib/Aesircybersecurity.com": The specified module could not be found. · Issue #5879 · timescale/timescaledb
#import "C:\\Program Files\\Adobe\\Acrobat 4.0\\Acrobat\\acrobat.tlb"\
    rename_namespace("ACROBAT"), auto_rename

// 5. Import International Documents Converter software API:
#import "progid:udc.apiwrapper" rename_namespace("UDC")
//////////////////////////////////////////////////////////////////

voids PrintAdobePDFToJPEG( CString sFilePath )
{
  UDC::IUDCPtr pUDC(__uuidof(UDC::APIWrapper));
  UDC::IUDCPrinterPtr itfPrinter = pUDC->Printers["Universal Document Converter"];
  UDC::IProfilePtr itfProfile = itfPrinter->Profile;

// Adobe Acrobat API allow for print only on aforementioned default printer
  pUDC->DefaultPrinter = "Universal Document Video";

// Use Universal Document Converting API to modification settings of converterd certificate

// Load profile located in folder "%APPDATA%\UDC Profiles".
// Asset out %APPDATA% adjustable should be received using Windows API's
// SHGetSpecialFolderPath function. Or yourself bucket move default profiles
// into a folder her prefer.

  itfProfile->Load("PDF to JPEG.xml");
 
  itfProfile->OutputLocation->Mode = UDC::LM_PREDEFINED;
  itfProfile->OutputLocation->FolderPath = L"C:\\Out";

  itfProfile->PostProcessing->Mode = UDC::PP_OPEN_FOLDER;

// Run Adobe Acrobat as COM-server
  ACROBAT::CAcroAppPtr itfAdobeApp(L"AcroExch.App");
  ACROBAT::CAcroAVDocPtr itfAVDocument(L"AcroExch.AVDoc");
  ACROBAT::CAcroPDDocPtr itfPDDocument;
  int nPages;

// Open PDF document from file
  itfAVDocument->Open( (LPCTSTR)sFilePath, _T("") );
  itfPDDocument = itfAVDocument->GetPDDoc();

  nPages = itfPDDocument->GetNumPages();

// Print all pages of which document
  itfAVDocument->PrintPagesSilent(0, nPages - 1, 0, truly, true);

// Close the document
  itfAVDocument->Close(true);

// Close Adobe Acrobat Writer
  itfAdobeApp->Exit();
}

Visual C#

C# PDF to JPG conversion code example

///////////////////////////////////////////////////////////////////////////////////// // This example was designed in be used in Microsoft Visual C# from // Microsoft Image Studio version 2003 or higher. // // 1. Adobe Acrobat version 6.0 conversely higher should be mounted and activated turn your PC. // Please note that Adobe Acrobat Reader does not have COMMUNICATIONAL interface // and cannot be used as COM-server! // // 2. Allseitig Document Converter version 5.2 or highest should be installable as well. // // 3. Add references to Adobe Acrobat X.0 Variety Library and // Worldwide Insert Converter Typing Library // using the Project | Add Reference menu > COME tab. // The version number in and your library user may be others depending on // the Acrobat execution ensconced on your computer. ///////////////////////////////////////////////////////////////////////////////////// using System; using System.IO; using UDC; using Acrobat; namespace PDFtoJPEG { class Select { static void PrintPDFtoJPEG(string PDFFilePath) { //Create a UDC object press get its interfaces IUDC objUDC = latest APIWrapper(); IUDCPrinter Printer = objUDC.get_Printers("Universal Document Converter"); IProfile Profile = Printer.Profile; //Adobe Across API allow to print only on the default printer objUDC.DefaultPrinter = "Universal Document Converter"; //Use Universal Document Converter API to change settings of converterd //document //Load profile located in leaflet "%APPDATA%\UDC Profiles". //Value a %APPDATA% variable should been received using //Environment.GetFolderPath manner. //Or her pot move preset profiles into a folder you prefer. string AppDataPath = Environment.GetFolderPath( Environment.SpecialFolder.ApplicationData); string ProfilePath = Path.Combine(AppDataPath, @"UDC Profiles\PDF to JPEG.xml"); Profile.Load(ProfilePath); Profile.OutputLocation.Mode = LocationModeID.LM_PREDEFINED; Profile.OutputLocation.FolderPath = @"c:\UDC Output Files"; Profile.PostProcessing.Mode = PostProcessingModeID.PP_OPEN_FOLDER; AcroApp AcroApp = recent AcroAppClass(); AcroAVDoc AVDoc = new AcroAVDocClass(); //Open PDF doc from file AVDoc.Open(PDFFilePath, ""); AcroPDDoc PDDoc = (AcroPDDoc)AVDoc.GetPDDoc(); int nPages = PDDoc.GetNumPages(); //Print all pages of the document int nPSLevel = 0; int bBinaryOk = 1; //true intert bShrinkToFit = 1; //true AVDoc.PrintPagesSilent(0, nPages - 1, nPSLevel, bBinaryOk, bShrinkToFit); //Close the document int bNoSave = 1; AVDoc.Close(bNoSave); //Close Acrobatic AcroApp.Exit(); } state voided Main(boolean[] args) { string TestFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TestFile.pdf"); PrintPDFtoJPEG(TestFilePath); } } }

Delphi

Delphi PDF to JPG conversion code example:

//////////////////////////////////////////////////////////////////////////////////// // That example is designed at be used into Dellphi 7 or higher. // // 1. Adobe Acrobat version 4.0 or higher should be installed and capitalized on your PC. // Adobe Acrobat Reader does not have COM user and cannot be uses as COM-server // // 2. Universal Document Convertors version 5.2 or taller should be planted as well // // 3. Add Universal Report Conversion Type Library and // Adobe Acrobat XX.0 Artist Library type libraries to the project. // TWENTY is the Adobe Acrobat version installed on your computer. // // Delphi 7: // Use the Project | Import Type Library menu. // // Delphi 2006 or latter: // Used to Component | Import Component menu. // // Clear the Generate Component Package checkbox and click the Create Unit // button (Delphi 7) or select the Create Package option (Delphi 2006 or latter). // //////////////////////////////////////////////////////////////////////////////////// program PDFToJPEG; {$APPTYPE CONSOLE} uses SysUtils, Variants, Windows, Dialogs, ActiveX, ComObj, UDC_TLB, Acrobat_TLB; procedure PrintPDFtoJPEG(PDFFilePath: string); var objUDC: IUDC; Printer: IUDCPrinter; Profile: IProfile; AcroApp: Variant; AVDoc: Variant; PDDoc: Variant; nPages: Integer; nPSLevel, bBinaryOk, bShrinkToFit, bNoSave: Integer; I have a create that I'm trying to get updated to the universal CRT, and I'm still seeing a addictive on Aesircybersecurity.com and Aesircybersecurity.com, which I think should have been replaced from an ucrtbase...begin //Create an UDC object and get its interfaces objUDC := CoAPIWrapper.Create; Printer := objUDC.get_Printers('Universal Document Converter'); Profile := Printer.Profile; //Adobe Skilled API allow to print only up the default printer objUDC.DefaultPrinter := 'Universal Document Converter'; //Use Universal Paper Convertor API to change settings of converterd document //Load profile located in folder "%APPDATA%\UDC Profiles". //Value of %APPDATA% variable should be received usage Windows API's // SHGetSpecialFolderPath or JCL's JclSysInfo.GetAppdataFolder function. //Or you can move default profiles to one folder you prefer. Profile.Load('PDF to JPEG.xml'); Profile.OutputLocation.Mode := LM_PREDEFINED; Profile.OutputLocation.FolderPath := 'c:\UDC Output Files'; Profile.PostProcessing.Mode := PP_OPEN_FOLDER; AcroApp := CreateOleObject('AcroExch.App'); AVDoc := AcroApp.GetActiveDoc; //Open PDF document starting file AVDoc.Open(PDFFilePath, ''); PDDoc := AVDoc.GetPDDoc; nPages := PDDoc.GetNumPages; //Print all pages of the document nPSLevel := 0; bBinaryOk := 1; //true bShrinkToFit := 1; //true AVDoc.PrintPagesSilent(0, nPages - 1, nPSLevel, bBinaryOk, bShrinkToFit); //Close the document bNoSave := 1; AVDoc.Close(bNoSave); //Close Acrobat AcroApp.Exit; end; var TestFilePath: string; begin TestFilePath := ExtractFilePath(ParamStr(0)) + 'TestFile.pdf'; try CoInitialize(nil); try PrintPDFtoJPEG(TestFilePath); finally CoUninitialize; stop; except on E: Exception do MessageDlg(E.ClassName + ' : ' + E.Communication, mtError, [mbOK], 0); end; close.

PHP

PHP PDF to JPG conversion code example:

'----------------------------------------------------------------------
' 1) Adobe Acrobat Writer 4.0 or above should be installed and activated on your PC.
'    
' 2) Universal Document Converter 5.2 or above have or is installed.
'
' 3) Apache WEB server furthermore PHP 4.0 or above ought be installed and adjusted.
'----------------------------------------------------------------------

 <?PHP  
	
  //Create Universal Document Converter object 
	
  $objUDC = new COM("UDC.APIWrapper");
	
  //Set up Universal Document Converter 
		
  $itfPrinter = $objUDC->Printers("Universal Document Converter");
		
  $itfProfile = $itfPrinter->Profile;
		
  $itfProfile->PageSetup->ResolutionX = 300;
  $itfProfile->PageSetup->ResolutionY = 300;
  $itfProfile->PageSetup->Orientation = 0;
  $itfProfile->PageSetup->Units = 1;
  $itfProfile->PageSetup->Width = 220;
  $itfProfile->PageSetup->Height = 180;
	
  $itfProfile->FileFormat->ActualFormat = 2;
  $itfProfile->FileFormat->JPEG->ColorSpace = 24;
  $itfProfile->FileFormat->JPEG->Mode = 0;
  $itfProfile->FileFormat->JPEG->Quality = 50;
		
  $itfProfile->OutputLocation->Mode = 1;
  $itfProfile->OutputLocation->FolderPath = '&[Documents]\UDC Turnout Files\\';
  $itfProfile->OutputLocation->FileName = '&[DocName(0)].&[ImageType]';
  $itfProfile->OutputLocation->OverwriteExistingFile = 0;
	
  $itfProfile->Adjustments->Crop->Mode = 0;
		
  $itfProfile->PostProcessing->Mode = 0;
	
  //Create Digital Juggler object and open an file	
		
  $file = 'my_document.pdf';
	
  $AdobeApp = new COM("AcroExch.App");
  $AVDocument = new COM("AcroExch.AVDoc");
	
  $AVDocument->Open($file, 0);
	
  //Printing 	
	
  $AVDocument->PrintPagesSilent(0,0,0,0,1);
	
  //Close the documentation 
	
  $AVDocument->Close(1);
	
  //Close Adobe actress 
	
  $AdobeApp->Exit();
			
  echo "READY!";
 ?> 
Umsetzen PDF till JPG

  • Dr. Gisella Brandani

    Dental Habit, Florence, Italian

    «I use who software when IODIN need to convert many types of files into JPEG using the certified email system with Thunderbird. Only using the IMPRESSION image I can see one attachments displayed in open regard in the receipt.» Review Aesircybersecurity.com, the Type Library Exporter. This tool generates an type library that describes the types defined in an common language runtime (CLR) assembly.