![]() Integrating third-party libraries into an existing application can be complex, particularly when the library wasn’t originally designed for such integration. Seeking feedback and guidance from the community can provide insights into existing plans, ongoing developments, or alternative approaches for supporting DJVU in Logseq. Ensure the integration aligns with Logseq’s design principles and maintains stability.Įngaging with the Logseq community or reaching out to the official development team would be valuable during the integration process. Implement integration: Incorporate the necessary changes to Logseq’s codebase or develop a Logseq plugin to integrate djvujs seamlessly. This may involve modifying existing code or developing a plugin system to accommodate djvujs.Īdapt djvujs to Logseq: Adjust the djvujs codebase to fit within the Logseq architecture, considering aspects such as file uploading, rendering DJVU content, and interacting with the DJVU viewer. Identify integration points: Examine the Logseq codebase to determine where DJVU support should be added. By integrating djvujs, Logseq could provide users with the ability to view and interact with DJVU documents directly within the application.Įvaluate the djvujs project: Familiarize yourself with djvujs, understand its functionalities, and ensure it works as a standalone Node.js application. It would be beneficial to explore the possibility of integrating this project into Logseq, enabling DJVU support. djvu files right in the browser and can be easily embedded into any web page.), developed under Node.js. DjVu.js Viewer is a widget that allows viewing. ![]() djvu files online without any connection with the server. I came across a promising project called djvujs ( GitHub - RussCoder/djvujs: DjVu.js is a program library for working with. While it’s possible to manually insert screenshots or clipped images from DJVU files into Logseq, it would greatly enhance the user experience if Logseq directly supported DJVU files. Logseq currently lacks support for DJVU file format, which poses a limitation for users who have documents in DJVU format instead of PDF. gscan2pdf (> 1.Feature Request: Add DJVU Support to Logseq If DjVu document has color images, then they'll be usually placed on background layer in this case user can take advantage of tools like ddjvu (extract only background layer) and imagemagick (auto-crop) to output just images instead whole canvas, but it can't be automated for creating PDF outputĪnother saner, but slower approach is use of regular OCR GUI tools. Lengthy comments below discuss representing smaller images from DjVu document page as separate objects, which is not easily possible because DjVu document page is itself just a single image with optional text layer, with no "information" about smaller images as separate objects. Which is identical to input DjVu file and has text layer inside: Then this nifty program takes care of everything that's inside this folder (HTML and TIFF files with same base name) and produces output PDF file with some by-products: sample.djvu This is where pdfbeads comes in play, and we simple execute: So that we end with these file in out work folder: sample.djvu Now we extract DjVu page to TIFF format with:ĭdjvu -format=tiff -page=10 sample.djvu pg10.tif Sed intervention corrects class names in output hOCR (which is just simple HTML file) We can use djvu2hocr command (from ocrodjvu package) to extract hidden text layer from DjVu file (it doesn't do any OCR or similar, it just extracts text layer with geometry), i.e.:ĭjvu2hocr -p 10 sample.djvu | sed 's/ocrx/ocr/g' > pg10.html ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |