Git Product home page Git Product logo

Comments (6)

jasny avatar jasny commented on August 17, 2024

Option b. should work, but might be broken. It's really an issue of legalthings/pdf-viewer.

from angular-pdfjs-viewer.

krusk8 avatar krusk8 commented on August 17, 2024

I'm interested to this functionality. The PDF in base64 string it's impossible to view on IE. Can you increase the priority. THank you.

from angular-pdfjs-viewer.

jasny avatar jasny commented on August 17, 2024

@krusk8 We welcome a PR for this.

from angular-pdfjs-viewer.

Phanu282003 avatar Phanu282003 commented on August 17, 2024

Hi All,

I am doing about display pdf from web-api (string base64), so Could you please share the full source code about this?

Thanks!!
Boy

from angular-pdfjs-viewer.

FanFanFantastic avatar FanFanFantastic commented on August 17, 2024

Same I got stuck on converting from base64 to pdf

from angular-pdfjs-viewer.

championboylay avatar championboylay commented on August 17, 2024

Following is how I implemented to load pdf base64:

var binaryImg = atob(url);
var length = binaryImg.length;
var arrayBuffer = new ArrayBuffer(length);
var uintArray = new Uint8Array(arrayBuffer);

for (var i = 0; i < length; i++) {
  uintArray[i] = binaryImg.charCodeAt(i);
}
var currentBlob = new Blob([uintArray], {type: 'application/pdf'});
$scope.pdf =  URL.createObjectURL(currentBlob);

from angular-pdfjs-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.