Foxit Quick PDF Library

Extract paths from a PDF

Foxit Quick PDF Library does not currently support the extraction of path information. However, the GetContentStreamToString function will extract the content stream which contains all of the drawing commands.

You would need to parse the content stream to extract the paths as well as processing transformations including rotation and scaling.

Here is the contents of a typical stream. The meaning of each function / command can be found in the PDF Specification documents.

q
BT
36 806 Td
ET
Q
2 J
BT
1 0 0 1 0 842 Tm
/F1 10 Tf
()Tj
ET
1 0 0 1 0 0 cm
BT
1 0 0 1 484.94 811.62 Tm
/F1 10 Tf
0 0 0 rg
(18/07/2014 5.07 PM)Tj
0 g
ET
1 0 0 1 0 0 cm
[] 0 d
2 J
1 0 0 1 0 0 cm
1 0 0 1 426.63 791.62 Tm
1 0 0 1 0 0 cm
[] 0 d
2 J
1 0 0 1 0 0 cm
BT
1 0 0 1 176.49 749.54 Tm
/F2 12 Tf
0 0 0 rg
(PHYSICAL STOCK REGISTER \(DETAILED\))Tj
1 0 0 1 0 0 cm
0.5 w
0 J
0 0 0 RG
[] 0 d
47.75 673 m
166 673 l
S
0.5 w
0 J
0 0 0 RG
[] 0 d
48 673.25 m
48 615.75 l
S

This article refers to a deprecated product. If you are looking for support for Foxit PDF SDK, please click here.

Updated on May 16, 2022

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: