dronord
Новичок
Кто пробовал $word = new COM("word.application");?...
Берём известный скрипт:
Открыть файл(.doc, .htm) ещё получается, а печатать не хочет - виснет ворд или выдает какое-то окошко(что скорее всего-раздается звук).
Принтер меняю на "Adobe PDF".
Виндовс и Офис 2003.
Acrobat и Distiller 6.0.
РНР 4.3.3.
Apache 1.3.31.
Кто так делал и получилось - какое у Вас ПО?
Может какие нюансы возможны и на моей конфигурации?
-~{}~ 08.07.05 13:23:
Не верю, что никто не пробовал.
Берём известный скрипт:
PHP:
<?
// You must have word and adobe acrobat distiller on
// your system, although theoretically any printer driver
// that makes .PS files would work.
// starting word
$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word->Version}\n";
// bring it to front
$word->Visible = 1;
// Select the acrobat distiller as the active printer.
// I presume that you could also use the Acrobat PDF writer // driver that comes with Acrobat full version.
$word->ActivePrinter = "Acrobat Distiller";
// Open a word document, or anything else that word
// can read
$word->Documents->Open($input);
// This will create a .PS file called $output
$word->ActiveDocument->PrintOut(0, 0, 0, $output);
// If you need a .pdf instead, use the acrobat
// distiller's watched folder option.
// closing word
$word->Quit();
// free the object
$word->Release();
$word = null;
?>
Принтер меняю на "Adobe PDF".
Виндовс и Офис 2003.
Acrobat и Distiller 6.0.
РНР 4.3.3.
Apache 1.3.31.
Кто так делал и получилось - какое у Вас ПО?
Может какие нюансы возможны и на моей конфигурации?
-~{}~ 08.07.05 13:23:
Не верю, что никто не пробовал.
