How to identify and extract vector graphics from PDF using xpdf library? [closed]

StackOverflow https://stackoverflow.com/questions/15570529

  •  29-03-2022
  •  | 
  •  

문제

Does anyone have a sample code demonstrating how to extract vector graphics objects (such as those representing charts and flow diagrams) from a PDF using XPDF library? There doesn't seem to be any documentation available on the Web for xpdf library nor could I find any any sample code that uses the library to extract information from PDF. I am going through xpdf's code base but any pointers to its documentation or a sample code would be very helpful.

도움이 되었습니까?

해결책

OutputDev class has stroke, fill, clip ... virtual members definitions. Just implement those and extract path and colour information from GfxState. You'll find path iteration in OutputDev based classes in xpdf code base such as TextOutputDev or ImageOutputDev

edit: This outputdev may give you the example you need

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top