FranckFreiburger / vue-pdf

vue.js pdf viewer
MIT License
2.24k stars 525 forks source link

Warning: Indexing all PDF objects #142

Open pri-14 opened 5 years ago

pri-14 commented 5 years ago

My pdf is blank and showing warning : Indexing all pdf objects. My pdf contains Uint8Array(175899). Attached the console log screenshot 1

This is the code I am trying to run :

<template>
     <div class="col-md-9">
            <pdf :src="pdfSrc"></pdf> 
          </div>
</template>

<script>
import vuePdf from 'vue-pdf'

var base64ToString = function(base64) { var splitstring = base64.split("-"); return Buffer.from(splitstring, 'base64') } ;

var pdfData = base64ToString('25-50-44-46-2D-31-2E-34-0A-25-E2-E3-CF-D3-0A-38-32-20-30-20-6F...................

export default { components: { 'pdf': vuePdf, }, data() { console.log(pdfData);

     return {
         pdfSrc: { data: pdfData },

    }
 },
}
     - 

     - vue.js version 3.3.0
     - webpack version 4.25.1
     - browser version chrome 67.0.3396.87
     - OS version windows 7
FranckFreiburger commented 5 years ago

The last version of vue-pdf supports Uint8Array as pdf :src (code)

pri-14 commented 5 years ago

I am using the latest version of vue-pdf 4.0.6 and still not getting results.

HOOKY123 commented 5 years ago

image

mvind commented 5 years ago

I'm getting same issue, but just with passing a local pdf to the component.

Elm1992 commented 4 years ago

I had the same problem. if use a local pdf, the current solution is to use webpack's file-loader

thomasklein-winemaker commented 4 years ago
Screenshot 2020-06-23 at 15 28 48

Same for me. Normal local pdf as far as I can tell. Using 4.1.0

kuamatzin commented 4 years ago

Any solution?

flwzz commented 4 years ago

I tried local pdf in static directory, and proxy a pdf url. Both way the browser console show the warning and get a blank canvas.

marched-debug commented 4 years ago

I see that this issue is still open, has anyone came up with a solution please?

marched-debug commented 4 years ago

For me it got partially solved by clearing the cache.