Subj : Re: Sixel Gallery - Viewa To : paulie420 From : Codefenix Date : Thu Feb 09 2023 09:12 am Re: Re: Sixel Gallery - Viewa By: paulie420 to Codefenix on Wed Feb 08 2023 08:48 pm Hey Paulie :) pa> VERY nice, Code - I also had this 'idea' for .PDFs... one could quickly pa> use a sixel converter to turn a PDF into a .six and display to the user. PDF to image conversion is a bit of a rabbit hole, considering it's a multi-page document format and can contain mixed media (text and/or images). At work I use GhostScript to take PDF documents and convert each page to a separate TIF image, which gets stored in our document management software. That part's easy enough, as GS has command line options for that use case. So, in theory, you could use GS to convert your source PDF to as many images as it has pages, and then convert those resulting images to sixel with ImageMagick, and display them. These conversion steps could take some time to complete if you plan on doing them on-the-fly. Here's where it gets hairy... In my case I need to make my TIF output black and white, because GS' color output options usually end up generating ENORMOUS image files. It can output to PNG and JPG as well, but there's still the issue of file size. If you're only storing the image files temporarily, maybe it's not a problem, but still something to think about. The other consideration is text quality/legibility. By converting PDF text to an image, the text won't look as sharp. By further converting it to sixel, it could look worse, especially if ImageMagick is scaling down the sixel for viewing in a typical 80x24 SyncTERM window. Maybe this isn't an issue if your source PDF is primarily image-based. But if it's text-based (but not a scanned image of text), you might consider using a tool like Poppler's pdftotext to extract the text from the PDF and display that as an alternative. |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07 --- þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=- .