Universal Document Converter
製品の概要
ダウンロード
ご購入
チュートリアル
開発者の方へ
サポートサービス
fCoder SIAについて


      サイト検索
   


      Video tutorial
Show tutorial



Main page>Developer Solutions>Examples>PHP>PowerPoint Presentations to JPEG

Converting PowerPoint Presentations to JPEG


'----------------------------------------------------------------------
' 1) Microsoft Power Point 97 or above should be installed and activated on your PC.
'
' 2) Universal Document Converter 5.2 or above should also be installed.
'
' 3) Apache WEB server and PHP 4.0 or above should 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 Output Files\\';
  $itfProfile->OutputLocation->FileName = '&[DocName(0)].&[ImageType]';
  $itfProfile->OutputLocation->OverwriteExistingFile = 0;
	
  $itfProfile->Adjustments->Crop->Mode = 0;
		
  $itfProfile->PostProcessing->Mode = 0;
	
  //Create MS Power Point object and open the file
		
  $file = 'my_presentation.ppt';
	
  $PPTApp = new COM("PowerPoint.Application");
  $Presentation = $PPTApp->Presentations->Open($file,1,1,0);
	
  //Print setup
	
  $Presentation->PrintOptions->PrintInBackground = 0;
  $Presentation->PrintOptions->ActivePrinter = "Universal Document Converter";
	
  //Print the presentation
	
  $Presentation->PrintOut;
		
  //Close the document
	
  $Presentation->Close;
	
  //Close Power Point	
	
  $PPTApp->Quit;
		
  echo "READY!";
		
 ?> 


© fCoder SIA fCoder SIAについて | サイトマップ