<?PHP
$objUDC = new COM("UDC.APIWrapper");
$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 Output Files\\';
$itfProfile->OutputLocation->FileName = '&[DocName(0)].&[ImageType]';
$itfProfile->OutputLocation->OverwriteExistingFile = 0;
$itfProfile->Adjustments->Crop->Mode = 0;
$itfProfile->PostProcessing->Mode = 0;
$file = 'my_document.pdf';
$AdobeApp = new COM("AcroExch.App");
$AVDocument = new COM("AcroExch.AVDoc");
$AVDocument->Open($file, 0);
$AVDocument->PrintPagesSilent(0,0,0,0,1);
$AVDocument->Close(1);
$AdobeApp->Exit();
echo "READY!";
?>
|