pdf icon indicating copy to clipboard operation
pdf copied to clipboard

valid PDF file getting "not a pdf file missing %%EOF" while reading

Open giovapanasiti opened this issue 7 years ago • 1 comments

I have this valid PDF which I can read and I can even parse it with nodejs. When I try to read it I get this:

not a PDF file: missing %%EOF

Any idea?

giovapanasiti avatar Sep 26 '18 12:09 giovapanasiti

I know it's too late, but for other's reference: I solved here passing the correct/exact file size in bytes:

    f,er4:=os.Open(targetDoc)
    fmt.Println(er4)
    fl,_:=f.Stat()
    r, er2 := rscpdf.NewReaderEncrypted(f, fl.Size(), func() string { return "" })

miguelpragier avatar Mar 04 '20 16:03 miguelpragier