printing a .RTF file to the screen

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kvram@passagen.se

    printing a .RTF file to the screen

    Hello !

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

    I have the following code:

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


    $filename = "C:\\test\\1.rt f";
    $word = new COM("Word.Appli cation") or die("Unable to instantiate
    Word");
    $word->visible = true;
    $word->Documents->Open($filename );
    $word->ActiveDocume nt->PrintOut();
    $word->ActiveDocume nt->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->ActiveDocume nt->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

Working...