searching pdfs in c2...

Get help using Construct 2

Post » Fri Mar 23, 2012 1:02 am

i was working on designing an app for the app store and android store that served as a manual for a particular job description. the manual is entirely in pdf form, and i have no idea how i would go about 'searching' those forms for relevenant info.

does anyone know of a possible way in c2?

this function is the stopgap. i can accomplish everything else that the app needs to do except this, which it turns out, is it's main function.

go and figure...
B
51
S
17
G
15
Posts: 1,029
Reputation: 26,314

Post » Wed Apr 18, 2012 3:07 am

i guess this was harder than i first realized.

can anyone let me know if this is outside the scope of c2 now?
B
51
S
17
G
15
Posts: 1,029
Reputation: 26,314

Post » Thu Apr 19, 2012 8:37 am

@harrio : I can code a plugin for that (in a week or two), but I need to clearly understand what you want to do.
Rephrase me if I'm wrong : you want to load a PDF inside C2, display it, do something like a 'Ctrl+F' inside (automatically), and find the text inside it ?
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Thu Apr 19, 2012 10:58 am

@Pode - this might help - PDF.js:
https://github.com/mozilla/pdf.js
A complete PDF loader implemented in pure Javascript. It's designed for rendering PDFs, but you might be able to get it just to do a text search without displaying anything.

Pretty crazy project, it's also gonna be pretty hefty (something like 1mb of javascript!)
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Thu Apr 19, 2012 2:20 pm

@Ashley: that was exaclty what I was planning to use .
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Sat Apr 21, 2012 12:52 am

@pode,

thank you for offering to help. the functionality should behave like this...

you can input terms or tag words and the program will search through a pdf manual to find the pages or sections that contain those words or tags. it will present a list of found pages and the user selects which page is shown.

i don't know if i need the pdf manual to be locally within the app or if it can be in a cloud host like dropbox or google docs.

i had the interface figured out and realized i had no idea how to search the pdf manual.

if this is not clear enough, or you need more specific information, please let me know.

and thank you once again.
B
51
S
17
G
15
Posts: 1,029
Reputation: 26,314

Post » Sun Apr 22, 2012 8:05 am

@harrio : I think I understand. I have a client request that needs to have PDF support integrated inside C2. I look at PDF.js a few months ago when it went public.
I spent some time looking the github of the project, and their wiki. It seems that they have working discussions on the idea of adding print & search, and they don't know how to prioritize it. There's already some code inside the project to have limited search capabilities, so when I'm going to integrate the public (in the next two weeks), I'll come back to you to say if it's possible or not.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Sun Apr 22, 2012 9:21 pm

@pode,

thank you very much. i seem to have a knack for picking what initially seem like simple projects, which later become much harder to complete than i realized...lol.
B
51
S
17
G
15
Posts: 1,029
Reputation: 26,314


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 27 guests