You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PyMuPdf I can do this, on pdf files that with text layer:
text_dict = page.get_text("dict")
for bl in text_dict['blocks']:
for line in bl.get('lines', []):
for span in line.get('spans', []):
print(span.get('font')) // here I got the actual font name
But in PDF.js, it transfer/change font name to internal identifier likes "g_d0_f18" .
Now in mupdf.js , can I extract these text blocks, with actual font name as py script did ?
And question sencond, still for pdf with text layer:
Can I replace/modify some text content before they were rendered into page/html elements in the viewer ? I need to replace some sepecial symbols(they were set in special custom font) into other characters , then when others select then copy its text they got a modified verstion text content.
The text was updated successfully, but these errors were encountered:
Thank you for your detailed answer. Migrating pdf lib for custom viewer is not a small project. I will continue to keep an eye on this library until it matures. @jamie-lemon
In PyMuPdf I can do this, on pdf files that with text layer:
But in PDF.js, it transfer/change font name to internal identifier likes "g_d0_f18" .
Now in mupdf.js , can I extract these text blocks, with actual font name as py script did ?
And question sencond, still for pdf with text layer:
Can I replace/modify some text content before they were rendered into page/html elements in the viewer ? I need to replace some sepecial symbols(they were set in special custom font) into other characters , then when others select then copy its text they got a modified verstion text content.
The text was updated successfully, but these errors were encountered: