Comments (7)
< a href="./ViewerJS/#data:application/pdf;base64,JVBERi0xLjQxxxxx..." >
can you show me the code
I got:
about:blank#blocked
error with the following code,, Here encodedString is a base64 string;:
href="./ViewerJS/#data:application/pdf;base64,<% out.println(encodedString);%>"
from viewerjs.
you mean by providing the pdf blob as a data-uri? where do you see the base64 data?
from viewerjs.
Well the server is sending me a base64 encoded string of the PDF instead of the actual path to the PDF document (don't ask why, I don't know myself). So i'm using a function to convert the base64 to uint8Array. And then I call PDFJS.getDocument(uint8Array). So in the viewer implementation, it's taking the href src from an a tag, so I was just wondering if there's a way to instead use that string. Thanks.
from viewerjs.
In general: yes
- it will require small API changes to feed a blob instead of URL
from viewerjs.
Hi @thz , Is this enhancement is implemented in latest version of viewer.js
from viewerjs.
Hi,
I wonder how should we build the link with a base64 encoded document
I did a test like this
[code] < a href="./ViewerJS/#< encoded_file_string >" > [/code]
But it does not work
Thanks.
from viewerjs.
I tried with this code:
[code] < a href="./ViewerJS/#data:application/pdf;base64,JVBERi0xLjQxxxxx..." > [/code]
It works in Firefox, but not in Chrome.
Is this the right code used?
Thanks.
from viewerjs.
Related Issues (20)
- Some characters are being displayed bigger than others
- Reloading a document
- How to automatically fit the pdf to screen? HOT 2
- Smooth scrolling?
- Text Overlapped in PDF document
- ViewerJs in Wordpress
- Capture the current page's width in page change evt ? HOT 1
- When using IDM : Unexpected server response (0) while retrieving PDF \"path-to-pdf"
- Viewer shows weird characters, when PDF is opened
- mingw32-make: *** No targets specified and no makefile found. Stop.
- Huhhh HOT 1
- Unsupported feature unknown with large base64 pdf HOT 2
- Random pages appear as blank when viewing large pdf document on latest chrome, Firefox and Edge browsers
- ViewerJS - Firefox not displaying text HOT 1
- ViewerJS with Angular front end and ASP.Net Core as Middle Tier Web API
- random fields in ODS spreadsheet return as blank
- Set PDF default view to Full instead of Automatic
- PDF Text is not clear. Blurry text on whole pdf pages
- empty pdf page
- scrolling not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viewerjs.