Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

apache tika - extract inline image from pdf with tick-python

I see answers about getting the inline images from PDF with tika in Java, for example Extract Images from PDF with Apache Tika

My question is whether it is possible to get inline images from pdf and store it as .png with python. I am using the tika-python package to call the tika server with the following code,

        headers = {
            'X-Tika-PDFextractInlineImages': 'true'
        }
        parsed = parser.from_buffer(file, headers=headers)

In the return there is X-TIKA:embedded_resource_path:["/image0.png", "/image1.jpg","/image2.png"] in the meta_data, but how can I access these images?

Thanks!

question from:https://stackoverflow.com/questions/65946010/extract-inline-image-from-pdf-with-tick-python

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...