Coder Social home page Coder Social logo

Comments (6)

drrc1709 avatar drrc1709 commented on May 29, 2024

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



<DocViewer
pluginRenderers={DocViewerRenderers}
documents={docs}

    theme={{
      primary: "#5296d8",
      secondary: "#000000",
      tertiary: "#5296d899",
      text_primary: "#ffffff",
      text_secondary: "#ffffff",
      text_tertiary: "#00000099",

      disableThemeScrollbar: false,

    }} />
</div>
; }

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

from react-doc-viewer.

mattmogford-alcumus avatar mattmogford-alcumus commented on May 29, 2024

Do you have any errors in the console?

from react-doc-viewer.

mattmogford-alcumus avatar mattmogford-alcumus commented on May 29, 2024

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

from react-doc-viewer.

drrc1709 avatar drrc1709 commented on May 29, 2024

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

from react-doc-viewer.

mattmogford-alcumus avatar mattmogford-alcumus commented on May 29, 2024

@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?

from react-doc-viewer.

drrc1709 avatar drrc1709 commented on May 29, 2024

docs.zip

from react-doc-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.