<?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->FileFormat->ActualFormat = 7;
$itfProfile->FileFormat->PDF->ColorSpace = 24;
$itfProfile->FileFormat->PDF->Compression = 4;
$itfProfile->FileFormat->PDF->Multipage = 2;
$itfProfile->OutputLocation->Mode = 1;
$itfProfile->OutputLocation->FolderPath = '&[Documents]\UDC Output Files\\';
$itfProfile->OutputLocation->FileName = '&[DocName(0)].&[ImageType]';
$itfProfile->OutputLocation->OverwriteExistingFile = 1;
$itfProfile->PostProcessing->Mode = 0;
$file = 'my_file.xls';
$ExcelApp = new COM("Excel.Application");
$ExcelBook = $ExcelApp->Workbooks->Open($file,0,1);
$ExcelWorksheet = $ExcelBook->ActiveSheet;
$ExcelPageSetup = $ExcelWorksheet->PageSetup;
$ExcelPageSetup->Orientation = 2;
$ExcelWorksheet->PrintOut(1,1,1,False,"Universal Document Converter");
$ExcelBook->Close(False);
$ExcelApp->Quit;
echo "READY!";
?>
|