Re: COrelDRAW com и php

Написал mendow в 17/04/2009 17:43:08

wOxxOm
большое спасибо за подсказку!
похоже сработало.
удалось создать документ и сохранить его.
Вот код на PHP:
Цитата:
<?
$empty = new VARIANT();
com_load_typelib('CorelDRaw.Application');
$cdr = new COM("CorelDRaw.application") or die("Unable to instantiate corel");
echo "Loaded CorelDraw, version {$cdr->Version}\n";
$cdr->Visible = 1;


$cdr->CreateDocument();
$s1 = $cdr->ActiveDocument->ActiveLayer->CreateRectangle(0.620803, 9.776315, 8.033945, 4.253673);
$s1->Fill->UniformColor->CMYKAssign( 0, 100, 100, 0 );

$cT = $cdr->ActiveDocument->ActiveLayer->CreateArtisticText( 0, 0, date("Y/m/d"), $empty, $empty);




$SaveOptions = $cdr->CreateStructSaveAsOptions();
// With SaveOptions
$SaveOptions->EmbedVBAProject = False;
$SaveOptions->Filter = 1795;
$SaveOptions->IncludeCMXData = False;
$SaveOptions->Range = 0;
$SaveOptions->EmbedICCProfile = False;
$SaveOptions->Version = 9;
$name = "J:\\temp\\art".time().".cdr";
$cdr->ActiveDocument->SaveAs($name, $SaveOptions);

?>

Источник: https://powerclip.ru/modules/newbb/viewtopic.php?post_id=97292

Rambler's Top100