Hi,
I want to read image file and write in to word document file using php. Actually i am developing shopping cart site. for that i have created barcode image. i need to take print outs. for example if i click print means same barcode should be generate 64 times in word document. how i do it?
i have tried with COM. please check the following code
<?php
// starting word
$word = new COM("word.application") or die("Unable to instantiate Word");
echo "Loaded Word, version {$word->Version}\n";
//bring it to front
$word->Visible = 1;
//open an empty document
$word->Documents->Add();
//do some weird stuff
for($i=1;$i<=64;$i++)
{
$word->Selection->InlineShapes->AddPicture("D:\Program Files\wamp\www\b.jpg ",false, True);
}
$word->Documents[1]->SaveAs("D:\Program Files\wamp\www\Uselesstest.doc");
//closing word
$word->Quit();
//free the object
$word = null;
?>
It works fine in local. but it is not working in server (it says COM.class is missing). i have checked some forums they said it works with MS based operation system. i have checked with windows only.
Please kindly any one help me asap the way for read and write image file in word document.
can we do this any other way?
we are reading and writing txt files using php
the same can we do with image file (read and write in word document) ??
Thanks
Prema