Business scenario: The online PDF download function is required. At the beginning, a third-party PDF.js is used. After checking, it is found that it does not work.

directory

 

Browser PDF cancellation method:

Add code to the required URL address

Pdf.js undownload:


Browser PDF cancellation method:

Add code to the required URL address

'#toolbar=0'
Copy the code

Added code:

or

After modification, look at the effect:

The entire row of black bars is gone

The job is done!

 

By the way

Pdf.js undownload:

Viewer.html adds hidden styles.

Viewer. Js annotates the following code. The number of lines varies according to the version, and it is recommended to use the compiler CTRL + F to retrieve the download.

One other thing, this version is different, the code is different, and the comment out method is the same

OK, you’re done!

Pay attention to Sun Call beast, take you to step on the pit