Alcumus / react-doc-viewer

Apache License 2.0
209 stars 101 forks source link

add option for view files tif #51

Closed drrc1709 closed 3 years ago

drrc1709 commented 3 years ago

Add option for view files tif, this library or extesion is the most complete that I found, and I do testing to integrate this with my web app, the option for view docs, no works

drrc1709 commented 3 years ago

hey friend, how are you?, I need your help, Besides that an error appears when showing some MS Office document, I have tried to use TIFFRenderer to see a .tiff file but in the browser it comes out completely white, it is not displayed, could you help me by indicating how to use this TIFFRenderer or how to use it if use DocViewerRenderers

this is my source ` import React from 'react'; import './App.css'; import DocViewer, { DocViewerRenderers } from "react-doc-viewer";

function App() { const docs = [ // { uri: "https://www.abbyy.com/media/14009/guide_english.pdf" }, { uri: require("./docs/Captura de pantalla (1).png") }, { uri: require("./docs/Doc1.pdf") }, { uri: require("./docs/test.2p.in.tiff") }, { uri: require("./docs/5526010020400101110027052018.tiff")}, // Local File { uri: require("./docs/Copia de CUADRO_REQ_UGPP - ULTIMO.xlsx")}, // Local File ];

return

; }

export default App; ` Captura de pantalla 2020-10-27 102712

mattmogford-alcumus commented 3 years ago

Do you have any errors in the console?

mattmogford-alcumus commented 3 years ago

Also, If you quickly need a renderer for TIF files, you can create custom renderers. https://www.npmjs.com/package/react-doc-viewer#custom-renderer

drrc1709 commented 3 years ago

I did that today but it doesn't work either, look at the code and the view, if you could please help me it would be very helpful and I would be grateful

imagen imagen

mattmogford-alcumus commented 3 years ago

@drrc1709 Would it be possible to provide the exact tif file you are using, this may well be a bug with particular tiff files. I only have a few example tif files and they render OK. Please can you try version 0.1.5 to see if this helps / gives you any information?

drrc1709 commented 3 years ago

docs.zip