Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: inlined base64 images in markdown format #176

Open
sglebs opened this issue Oct 25, 2024 · 0 comments
Open

Feature request: inlined base64 images in markdown format #176

sglebs opened this issue Oct 25, 2024 · 0 comments

Comments

@sglebs
Copy link

sglebs commented Oct 25, 2024

I would like to suggest that the image extraction could also be done in inlined markdown format (controlled by a flag) using base64 instead of an external file. Here's the code:

b64_format = base64.b64encode(png_data)
markdown_format = f"![](data:image/png;base64,{b64_format.decode('utf-8')})"

If you can add the title & alt, even better. Not sure if you have these values in the PDF.

Thanks for listening, thanks for the lib, great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant