<?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 = 3;
$itfProfile->FileFormat->TIFF->ColorSpace = 24;
$itfProfile->FileFormat->TIFF->Compression = 3;
$itfProfile->FileFormat->TIFF->Multipage = 2;
$itfProfile->FileFormat->TIFF->Smoothing = 1;
$itfProfile->OutputLocation->Mode = 1;
$itfProfile->OutputLocation->FolderPath = '&[Documents]\UDC Output Files\\';
$itfProfile->OutputLocation->FileName = '&[DocName(0)].&[ImageType]';
$itfProfile->OutputLocation->OverwriteExistingFile = 1;
$itfProfile->Adjustments->Crop->Mode = 0;
$itfProfile->PostProcessing->Mode = 0;
$itProfile->ShowProgressWnd = 1;
$file = 'my_scheme.vsd';
$VisioApp = new COM("Visio.Application");
$Drawing = $VisioApp->Documents->Open($file);
$Drawing->PrintCenteredH = True;
$Drawing->PrintCenteredV = True;
$Drawing->PrintFitOnPages = True;
$Drawing->Printer = "Universal Document Converter";
$Drawing->PrintOut(0);
$Drawing->Saved = True;
$VisioApp->Quit;
echo "READY!";
?>
|