Skip to content
Discussion options

You must be logged in to vote

Threading is not supported at all in PyMuPDF! Please use the multiprocessing module of Python when needed.

Creating font subsets is now directly supported by MuPDF. It still is declared as "experimental", so we haven't yet included it officially.
But you can use it and we do not know of any issues. It is at least 15 times faster than the current method.
Here is what you can do instead doc.subset_fonts():

pdf = fitz._as_pdf_document(doc)  # access underlying PDF-specific level
fitz.mupdf.pdf_subset_fonts2(pdf, list(range(doc.page_count)))

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
6 replies
@izerui
Comment options

@JorjMcKie
Comment options

@izerui
Comment options

@JorjMcKie
Comment options

@izerui
Comment options

Answer selected by izerui
Comment options

You must be logged in to vote
3 replies
@JorjMcKie
Comment options

@izerui
Comment options

@JorjMcKie
Comment options

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