Reply to printing a .RTF file to the screen

Your name:

Reply:


Posted by kvram on 01/24/07 16:13

Hello !

I want to print the contents of a .RTF file to the screen.

I have the following code:

//========================================
<?php


$filename = "C:\\test\\1.rtf";
$word = new COM("Word.Application") or die("Unable to instantiate
Word");
$word->visible = true;
$word->Documents->Open($filename);
$word->ActiveDocument->PrintOut();
$word->ActiveDocument->Close();
$word->Quit();

?>
//========================================

I can access the file because i see it flashing by (in MS Word),
but later i'm given the option of saving it to .MDI format. (Microsoft
Document Imaging). So the question is about why ==>

$word->ActiveDocument->PrintOut();

doesn't simply output the contents of RTF on the screen?
I have a guess and that is: by default it is refering to the
printer device (file description 1?) . and in that case i tried
to redirect it to other file descriptors like 0 and 2. But non worked.


thanks for your time and suggesions,
kave

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация