I have been developing a small website for a university allowing lecturers to upload files to the server to be stored on mysql(as pointers to files). No problem all works fine-but the big-wig lecturer now wants an automated printing process where a user can click a link that will print all the documents under a certain topic. The problem is the files stored are word and pdf files. Now accessing the print method through word has proved to be pretty straight forward with com something like..
i.e $word = new COM("word.application") or die("Unable to
instanciate Word");
$word->Visible = 0;
$word->application->DisplayAlerts = "False";
$word->Documents->Open("c:\my documents\LisaLangley.doc");//an example file path
$word->ActiveDocument->PrintOut();
$word->Quit();
$word->Release();
$word = null;
This is nice as remains fully automated without the user having to use a print dialogue box //see document to be printed etc..
BUT I have been experimenting trying to do the same thing with pdf files with no success-I have tried using the ActiveX control eg
$pdf= new COM("PDF.PdfCtrl.5") ;
$pdf->loadfile("address of file here");
etc...
but now realise this kind of access needs some kind of VB/delphi form to succeed
If any one has managed to overcome this problem I would be really interested to hear from you!
Many thanks
Peter