On Mon, Jul 25, 2011 at 5:24 AM, Josef <[email protected]> wrote: > Being able to view a PDF from within Leo would be nice, even more so, > if it allows displaying a particular page, as I tend to collect lots > of references to specific PDF pages.
Same here, thoughts: - use (for example) pdfminer to pull text from the pdf, it's pdf2text script will do a page split. This results in plain text which has lots of advantages over rendered pages. - populate a Leo tree with the pdfminer.pdf2text output (http://www.unixuser.org/~euske/python/pdfminer/index.html) Another advantage of the pdf2text approach is the potential to index the content with something like sphinxsearch. (http://sphinxsearch.com/) Working with the plain text has disadvantages, it's a messy business to generate text from a page with sidebars, captions, columns and other non-linear structure. Working with rendered content has other pros and cons, and probably requires more coding. I've considered some sort of scheme where plain text pages are used as indexes to pull a png rendering of the page from the pdf. Though clunky, I think all the pieces are there. This might allow the Leo body to hold text, and it's render pane to show the image. Maybe the OpenOffice (LibreOffice) Python bindings could help. OO has great pdf capability. Thanks, Kent It should allow such references > to work cross-platform. Different external viewers Acrobat, Evince, > Okular, xpdf etc. all use a different syntax for selecting a > particular page, which makes it difficult to write page references in > a platform independent way when using external viewers. > > Spinning this idea a bit further: such a PDF viewer could then > possibly also display the PDF output of @rst nodes, or (pdf-)latex > files. I also would be delighted to see Leo as a better TeX editor. > TeXworks does a great job at synchronizing the PDF view with the LaTeX > source - I wish Leo would have similar LaTeX support. > > - Josef > > On Jul 21, 8:54 pm, Kent Tenney <[email protected]> wrote: >> On Thu, Jul 21, 2011 at 12:41 PM, Terry Brown <[email protected]> >> wrote: >> > On Thu, 21 Jul 2011 12:36:14 -0500 >> > Kent Tenney <[email protected]> wrote: >> >> >> I don't have in inkling as to the magic which renders views >> >> of stuff like videos, could it be convinced to show content of a pdf? >> >> >> I have lots of pdf's with content of interest. >> >> > A question of whether there's a Qt wrapper for it, not aware of any >> >> http://doc.qt.nokia.com/qq/qq27-poppler.html? >> >> > unless the full-blown (as opposed to the light weight) web browser >> > widget can wrap one. >> >> > Cheers -Terry >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "leo-editor" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group >> > athttp://groups.google.com/group/leo-editor?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "leo-editor" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/leo-editor?hl=en. > > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
