How to View Pdf in React using React PDF || React PDF Viewer || Full setup React PDF || React JS

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ต.ค. 2023
  • Hello Guys,
    In this video I have shown how you can show pdf in react js. For this I have used a package known as React-PDF. I have shown pdf from file location and also from mongo db.
    Not only this we also have customized the view of React-Pdf and added some feature.
    Frontend Code:
    github.com/the-debug-arena/Re...
    Backend Code:
    github.com/the-debug-arena/Re...
    Thank You.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 36

  • @meredithwhite11
    @meredithwhite11 8 หลายเดือนก่อน

    Thank you ! I've been trying to load a PDF in my react app and kept getting this error Error: Invariant failed: Invalid parameter object: need either .data, .range or .url. I wasn't importing pdfjs and I had the pdf worker wrong, so this video helped me correct my error.

  • @ethancolin7792
    @ethancolin7792 6 หลายเดือนก่อน

    Thank you sir, had a hard time loading a pdf until I came across your video!

  • @NishantSingh-br6iu
    @NishantSingh-br6iu 5 หลายเดือนก่อน

    Very Helpful I can't explain in words Saved lot of time

  • @codeawezpassion7022
    @codeawezpassion7022 2 หลายเดือนก่อน

    Ooo my god .Thank you so much for the line page where we have applied renderedTextLayer.I have been working on this how to remove that part ..I got your video thanks a lot .Love from delhi❤❤❤

  • @jhungulle1898
    @jhungulle1898 7 หลายเดือนก่อน

    Thank you, it was very clear, I was able to code along. Superb tutorial!

  • @chickenchoclates1971
    @chickenchoclates1971 5 หลายเดือนก่อน

    Great video finally able to render PDF file.

  • @mbackwithlotofhorror
    @mbackwithlotofhorror 4 หลายเดือนก่อน

    Thanks, it worked!

  • @ricky-hn6bn
    @ricky-hn6bn 8 หลายเดือนก่อน

    big thanks

  • @clypy2634
    @clypy2634 8 หลายเดือนก่อน +1

    I just graduate and got hired in alturas group of companies in july and resigned in september because I only help with two features. And now I am trying to learn react.. bro can you make a simple e-commerce website using react and explain every code.. i've seen this video of yours because i am trying to make my mothers(shes a teacher) job easier and of course my experience because i have a lot to learn, bro i would really appreciate it if you make a vid about full e-com vid with mongodb or xampp or anything as long as its locally stored all of us really dont care about the design because i am in the office and the functionality is the most important thing i have notice there. Pretty Please BRO.

    • @thedebugarena
      @thedebugarena  8 หลายเดือนก่อน

      I got your concern I will try to make but can't commit when it will be completed.

  • @user-nl8fy2sb1n
    @user-nl8fy2sb1n 4 หลายเดือนก่อน

    Thanks @TheDebugArena for the wonderful video. My scenario is little different Can you please tell how can i convert my react component to pdf and download the pdf on a button click

    • @thedebugarena
      @thedebugarena  4 หลายเดือนก่อน

      You can to convert your react component in that case there are packages which helps us to do that. You can checkout jspdf it allows to convert react component into pdf

  • @user-rc7ru6vi6o
    @user-rc7ru6vi6o 7 หลายเดือนก่อน +1

    Hey thanks for the tutorial, but do you know why i always got "Failed to load PDF file." I've also try to clone your repo but still got the same result

    • @thedebugarena
      @thedebugarena  7 หลายเดือนก่อน

      It might be that your pdf is taking time try to handle that condition or else dm me on instagram.

    • @josuedavidkennedymamani3576
      @josuedavidkennedymamani3576 3 หลายเดือนก่อน

      Were you able to solve why that happens?

  • @user-mv3jv8cw7z
    @user-mv3jv8cw7z 7 หลายเดือนก่อน

    I have an error that only the pagenumber showing on the screen I want also to display the text from pdf how to fix this?

  • @acloudonthebluestsky9687
    @acloudonthebluestsky9687 หลายเดือนก่อน

    how to display file PDF with base64 or binary files boss ?

  • @jspua8014
    @jspua8014 9 หลายเดือนก่อน +1

    sorry, may I ask for updating the pdf and picture using multer?

    • @thedebugarena
      @thedebugarena  9 หลายเดือนก่อน

      For updating you can use UpdateOne in your api and you can watch previous videos In that I have shown how to upload pdf and image

  • @Dhanushsaji
    @Dhanushsaji 4 หลายเดือนก่อน

    If I'm getting pdf link which is stored in AWS how can I show it ?
    React-pdf isn't working for pdf link

    • @thedebugarena
      @thedebugarena  4 หลายเดือนก่อน

      It should work directly but if it is not working have a look at documentation once whether there is any separate attribute for link. If issue still persists dm me on instagram

    • @manishchandolu3399
      @manishchandolu3399 2 หลายเดือนก่อน

      bro i am having same problem, what did you do??

  • @mdhasanmia474
    @mdhasanmia474 8 หลายเดือนก่อน

    How fix height width when load success according to my container width - height.
    Actually when i use big size pdf its show scroolbar Thats why i want to fix height width with my containersize

  • @mohammedzaid6915
    @mohammedzaid6915 4 หลายเดือนก่อน

    Its not responsive wht can we do for that

  • @user-zw3lb5fz6d
    @user-zw3lb5fz6d 5 หลายเดือนก่อน

    It's really just too bad that react-pdf is not responsive by default.

  • @keerthig8139
    @keerthig8139 4 หลายเดือนก่อน

    Page width ela customise chesukovali bro

    • @thedebugarena
      @thedebugarena  4 หลายเดือนก่อน

      Didn't get you

    • @Aswinikrishn
      @Aswinikrishn 4 หลายเดือนก่อน

      width={window.innerWidth} Give it for Page component

  • @NanoGi-lt5fc
    @NanoGi-lt5fc 7 หลายเดือนก่อน

    Source code

    • @thedebugarena
      @thedebugarena  7 หลายเดือนก่อน

      Check out description of previous video

    • @thedebugarena
      @thedebugarena  7 หลายเดือนก่อน

      Added link in the description of this video