PDF search
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 108
- Joined: Mon Mar 20, 2017 5:13 am
PDF search
What I'm trying to do is use a drop-down menu to quickly navigate to parts of a pdf in the browser widget without vail, any ideas?
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: PDF search
If the contents are also available in epub format this is easy. If you're stuck with PDF it's harder.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: PDF search
As a followup to the previous post I would like to ask for a little bit more information about how one can search epub documents within LiveCode. My LC app is the front end for thousands of PDFs. I manually put data about each document into a SQLite database. A search for relevant PDFs is done by searching the database. I do not know how one can search the PDFs except by a program such as DTSearch. Converting PDFs to epub documents appears to be a possible alternative to my method.
Does one begin by converting the pdf to epub? Once you have a epub documents, can you navigate to a particular page as well as search the text? Do you search the epub document with LiveCode commands and functions? Can Boolean searches be done? Is there a online article about the process?
Thanks for any information.
Monty May
Does one begin by converting the pdf to epub? Once you have a epub documents, can you navigate to a particular page as well as search the text? Do you search the epub document with LiveCode commands and functions? Can Boolean searches be done? Is there a online article about the process?
Thanks for any information.
Monty May
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: PDF search
Epub is a Zip-based format. LC includes an external for working with Zips.
To get started, grab any epub and change its file extension to ".zip", then double click it to let your OS unzip it. In the resulting folder you'll be able to see its contents. A quick search for details on epub format will tell you all you need to know from there.
To get started, grab any epub and change its file extension to ".zip", then double click it to let your OS unzip it. In the resulting folder you'll be able to see its contents. A quick search for details on epub format will tell you all you need to know from there.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: PDF search
As Richard said, ePub is a renamed zip archive. The archive consists of xml, html, xhtml files with a few others depending on the nature of the book. There are no pages as such as the content needs to flow to fit the screen size of the reader. So searching an epub requires you to unzip the package and then loacate the text content (usually in a folder by itself) and then searching the enclosed files (sans tags).
I placed an epub reader on livecode share a while ago which describes the unpacking and reconstruction of an ePub 2 document, it opens and places the publication into arrays. Then you can do with it what you want. I think it was wriiten around LC 5 or 6 but should still work.
It was part of a personal project to read an ePub and then put it into an SQlite db so as to use the full text searching (simple, boolean, proximity etc) SQlite offers.
I placed an epub reader on livecode share a while ago which describes the unpacking and reconstruction of an ePub 2 document, it opens and places the publication into arrays. Then you can do with it what you want. I think it was wriiten around LC 5 or 6 but should still work.
It was part of a personal project to read an ePub and then put it into an SQlite db so as to use the full text searching (simple, boolean, proximity etc) SQlite offers.