June 15, 2013, 9:07pm
i need to open a document in yii application in order to print it.
in a folder i have a x.php file, and a y.docx file
in x.php file i wrote:
<h3> <?php echo CHtml::link('Back', array('/site/page', 'view'=>'y.docx'));?> </h3>
in the first link the result is : The requested view "y.docx" was not found.
the second link’result is: The system is unable to find the requested action “y.docx”.
can anyone help me, how to generally open a document file?
June 16, 2013, 6:08am
You’ll need an external library to do what you want.
Here’s one that should allow you to open a Word document:
June 16, 2013, 7:12pm
it seems that this library generate docx report. i already used the mpdf extension to generate docx and pdf reports. the problem now is to open the generated reports or any other docx documents.
for example if i generated a report using one of these libraries or extension, and i put the output result in protected/reports folder. and i created a link to open the generated documents, how to write this link?
June 17, 2013, 12:19am
May be the document is not linked correctly
June 19, 2013, 8:19pm
i generated a pdf report under \protected\reports\StudentReports\certificate.pdf folder
when i generate the report, it redirect me to the following path:
in this page, i need to make a link to the studentReports to open certificate.pdf
anyone have any idea how to make this happen.