Skip to content

pdf.contentStream(), pdf.textStream() and pdf.propertyStream() have no output #33

@dasblitz

Description

@dasblitz

#Hi!

I'm trying this lib and although I can get this to work:

pdf
  .pdfStream()
  .pipe(fs.createWriteStream('out.pdf'))
  .on('finish', function() {
    console.log("We're done!")
  })
  .on('error', function(err) {
    throw err
  })

The following shows nothing (same goes for contentStream and propertyStream):

pdf
  .textStream()
  .on('data', function(data) {
    console.log(data)
  })

The following works, although it exits with an error "Error: write EPIPE"

pdf.pngStream(300).pipe(fs.createWriteStream('out-page1.png'));

I'm not to familiar with streams so I'm wondering if I'm doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions