Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

641
Views
Converting Application/octet-stream to Base64 string in Javascript

I am trying to render a PDF using PDFJS Library. https://mozilla.github.io/pdf.js/examples/

We are receiving Content-type as "application/octet-stream; charset=UTF-8" like below from an API that we are calling within javascript from our HTML. But PDF JS is not able to use app/octet stream directly. Is there any way to natively get base64 from the octet stream in Javascript,so it can be used by PDFJS.

PDF JS can directly use base64 string : https://jsfiddle.net/pdfjs/cq0asLqz/

%PDF-1.4
%����
1 0 obj
<<
/Pages 2 0 R
/Type /Catalog
>>
endobj
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!