S. L.
S. L.

Reputation: 680

Extract image from PDF stream

I have a decoded PDF stream, nothing else, that contains 2 different "sections'. The first is text, which I am able to parse using the explanation outlined here. However the second section is basically a long string of floats and the letters c, l, m. Here is a small extract:

TJ ET BT 7.9701 0 0 7.9701 303.883 132.067 Tm /Ty18 1 Tf (1) Tj ET Q q /Cs1 cs 0 sc 217.8034 565.2423 m 216.5899 564.9437 215.4236 564.0896 214.8605 563.0871

I'm not sure how to parse this. My first instinct was that it could be an image but the literature I've found so far leads me to think that I would find it as a binary stream. Is there a way to find out what this is?

Upvotes: 0

Views: 284

Answers (1)

KenS
KenS

Reputation: 31199

It's a sequence of PDF operations. cs is set colour space (in this case to the named colour CS1) sc is set colour, in this case to 0 (what that actually mean depends on the colour space), m is move to, c is curve to, l is line to, etc.

Upvotes: 2

Related Questions