Skip to content

Instantly share code, notes, and snippets.

View magnet's full-sized avatar
⚙️
Rustin'

Simon Chemouil magnet

⚙️
Rustin'
View GitHub Profile
@SimonSapin
SimonSapin / pdfedit.py
Created December 21, 2020 10:51
Make a PDF file editable in LibreOffice, using Poppler and Inkscape
#!/usr/bin/env python3
"""
Make a PDF file editable in LibreOffice.
LibreOffice Draw can import and export PDF files, effectively making it a PDF editor.
However text in imported documents often looks broken, such as with
text rendered with a different font and overflowing into the next column.
What I suspect happens is that PDF files typically embed every font they use,
but LibreOffice’s internal document model does not support embedded fonts