doc file na xa master...gusto lng gyud nko mu print xa sa browser..T__T
tabang...
Just use Content-Type: application/msword without Content-Disposition. I'm not sure if this works with other browsers such as Firefox and Chrome because this requires ActiveX.
@ tin tin
yup yup..com sci ko..
di nlng nko pugson og print sa browser..hehe..kanang possible bah nga i open nko xa sa ms word as read only para d sad nila ma edit ang contents??..by just clicking on a link in my site??..
Lisud man na mo print sa browser. Either you need an activex or i-download ang document.
browser is on the client side, which in some way impossible to handle. They cannot even modify directly on the said file you have. not unless if running in LAN/Intranet. Why not just convert your data into .PDF format and display it on your web? or if possible read your .doc file into XML format.
sample code: expected to popup a Download dialog.
<?php
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="disfile.pdf"');
readfile('origfile.pdf');
?>
Naay nindot ani. Why not use openoffice api(api: The OpenOffice.org API Project)? Para maka-open ka ug doc file on a server-side and multiplatform.
Last edited by eax; 09-07-2008 at 03:42 PM.
@ mark - my db is operating via intranet and i dont want other users to edit the displayed doc file thats why i just want it to be displayed via browser..
i think ill just use the code that prompts the user to open it in ms word/openoffice..
can i automatically set the doc file to be read only when viewing it in msword/openoffice?..
Similar Threads |
|