CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 document viewer

Print topic Send  topic

Author Message
kirchaj

Posts: 215
Posted: 09/10/2014, 5:56 AM

has anyone integrated a document viewer, such as google doc viewer, into CCS? I was actually able to get the google viewer to work very easily, but have some reservations because these are private files.

Any other options? self hosted? I need to be able to view a very wide variety of files, office docs, pdfs, video, etc.

Any ideas would be appreciated.
TK
View profile  Send private message
arronlee

Posts: 6
Posted: 07/07/2015, 8:43 PM

I think it will be much more convenient if you have a fine pdf converter. You can convert pdf to other files to view them in different viewers. You can check it.
http://www.pqscan.com/convert-pdf/
http://www.pqscan.com/convert-pdf/to-bmp-csharp.html
I hope you success. Good luck.

_________________
Best Regards,
Arron



View profile  Send private message
calosteward

Posts: 5
Posted: 07/28/2015, 9:03 PM

I found a related document viewer. And I use PDF as samples for you:
http://www.rasteredge.com/how-to/csharp-imaging/pdf-online-viewer-create/
http://www.rasteredge.com/how-to/csharp-imaging/pdf-windows-viewer-create/
DOC,DOCX, xls, xlsx...can be founded as well on the websites.
Hope it can help you.
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 08/15/2015, 5:22 PM

Maybe you can do a substr on the document extension and based on the result setup if/else to specify the mime type. I've only done this with PDF (example below - includes buffer mgmt), but imagine it would work for any mime-type:

if($fileext == ".pdf"){
if(file_exists($filepath)){
header('Content-type: application/pdf');
$handle = fopen($filepath, "rb");
while (!feof($handle)) {
echo fread($handle, 2048);
ob_flush();
}
fclose($handle);
}}

maybe for excel ??

header('Content-type: application/vnd.ms-excel');

and you wouldn't likely require the buffer stuff..


Here's a link to some mime-types...

http://stackoverflow.com/questions/4212861/what-is-a-co...r-docx-pptx-etc
_________________
Central Coast, NSW, Australia.

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.