Author Topic: nPDF - A document viewer for the Nspire  (Read 238923 times)

0 Members and 1 Guest are viewing this topic.

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
nPDF - A document viewer for the Nspire
« on: November 29, 2013, 11:50:49 pm »
nPDF is a document viewer for the Nspire that supports PDF, XPS, CBZ, and various image formats through the (relatively) lightweight MuPDF. Ndless 3.1 or above is required, and nPDF is licensed under GPLv3 or later.


(Screenshot of opendatastructures.org)

Controls:

  • Touchpad/Numpad: Scrolling
  • ×: Zoom in
  • ÷: Zoom out
  • -: Previous page
  • +: Next page
  • Ctrl+G: Go to page
  • Esc: Exit
Download version 0.4 beta: http://ti-pla.net/a139503
Source code: https://github.com/Legimet/nPDF
« Last Edit: December 07, 2015, 08:25:19 pm by Legimet »

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: nPDF
« Reply #1 on: November 30, 2013, 06:09:04 am »
Thanks.
What are the problems you ran in ?
« Last Edit: November 30, 2013, 07:21:59 am by critor »
TI-Planet co-admin.

Offline Le solutionneur

  • LV3 Member (Next: 100)
  • ***
  • Posts: 70
  • Rating: +14/-10
    • View Profile
Re: nPDF
« Reply #2 on: November 30, 2013, 06:24:00 am »
Nice :D
I guess he has some trouble with the API functions but once he understands them, it'll be fine!
"Commit to the Lord whatever you do and your plans will succeed." - Proverbs 16:3
"Whatever you do, work at it with all your heart, as working for the Lord, not for men. " - Colossians 3:23

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: nPDF
« Reply #3 on: November 30, 2013, 07:23:02 am »
The API seemed to be working in the latest animated GIF demo.
Writing to the screen shouldn't be more complicated than writing to a PNG image.
« Last Edit: November 30, 2013, 07:23:15 am by critor »
TI-Planet co-admin.

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: nPDF
« Reply #4 on: December 11, 2013, 04:08:04 pm »
nPDF 0.1 is attached in the first post! It only works on CX right now, and it's 8mb, but still, its the first PDF viewer for the Nspire! :)

Offline LDStudios

  • Coder Of Tomorrow
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 388
  • Rating: +41/-1
    • View Profile
    • LD Studios
Re: nPDF
« Reply #5 on: December 11, 2013, 04:08:52 pm »
Cant wait to try it out :)



Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: nPDF
« Reply #6 on: December 11, 2013, 04:19:04 pm »
Wow, I'm greatly impressed. I could easily run into my math lessons with this. This is one of the most powerful tool I could see on nSpire.

Post it to tiArchive, that'll get instantly showcase...

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: nPDF
« Reply #7 on: December 11, 2013, 04:38:35 pm »
Great program, the biggest TI-Nspire Ndless program ever! :D

Some notes which are going to be useful for a next release, I hope:

- seems to crash when trying to open a non-supported file
you could test the file header and display an error - and maybe avoid showing those files

- doesn't seem to correctly set up the '.pdf' extension when the Ndless config file is missing
how do you do this ? there is a new Ndless instruction for setting up new extensions, where you don't even need to check/parse the config file content by yourself anymore
TI-Planet co-admin.

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: nPDF
« Reply #8 on: December 11, 2013, 04:42:06 pm »
you could test the file header and display an error - and maybe avoid showing those files

I have to add error handling, the MuPDF library uses some special exception handling system.

- doesn't seem to correctly set up the '.pdf' extension when the Ndless config file is missing
how do you do this ? there is a new Ndless instruction for setting up new extensions, where you don't even need to check/parse the config file content by yourself anymore

I made a function for that, but forgot to call it XD
EDIT: The function uses cfg_register_fileext to register the .pdf, .xps, and .cbz extensions.
EDIT 2: Eiyeron, I'll add it to ticalc.org once i add some more features to it. Right now it kind of sucks. :P
« Last Edit: December 11, 2013, 04:44:54 pm by Legimet »

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: nPDF
« Reply #9 on: December 11, 2013, 04:45:29 pm »
- doesn't seem to correctly set up the '.pdf' extension when the Ndless config file is missing
how do you do this ? there is a new Ndless instruction for setting up new extensions, where you don't even need to check/parse the config file content by yourself anymore

I made a function for that, but forgot to call it XD
EDIT: The function uses cfg_register_fileext to register the .pdf, .xps, and .cbz extensions.

Ok thanks.
Then it will be for the next update ;)
TI-Planet co-admin.

Offline Le solutionneur

  • LV3 Member (Next: 100)
  • ***
  • Posts: 70
  • Rating: +14/-10
    • View Profile
Re: nPDF
« Reply #10 on: December 12, 2013, 12:20:49 pm »
Well done :D
"Commit to the Lord whatever you do and your plans will succeed." - Proverbs 16:3
"Whatever you do, work at it with all your heart, as working for the Lord, not for men. " - Colossians 3:23

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: nPDF - A document viewer for the Nspire
« Reply #11 on: February 18, 2014, 08:34:35 pm »
Hi, I just started continuing work today :)

Here are some planned features (in no particular order):
Proper error handling (using MuPDF's C exception handling system)
Zooming
A menu
Allowing the holding down of arrow keys
Find
Rotate page
Some convenient keyboard shortcuts (with help)
Select/copy/paste text (using the Nspire clipboard, i think nTxt has such a feature)

Feel free to post additional suggestions here.
« Last Edit: February 18, 2014, 08:37:49 pm by Legimet »

Offline nspireguy

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +11/-6
    • View Profile
    • NspireGuy
Re: nPDF - A document viewer for the Nspire
« Reply #12 on: February 18, 2014, 08:41:32 pm »
this sounds good. will you be able to see pics that are in the pdf?

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: nPDF - A document viewer for the Nspire
« Reply #13 on: February 18, 2014, 08:41:51 pm »
You already can ;)

Offline nspireguy

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +11/-6
    • View Profile
    • NspireGuy
Re: nPDF - A document viewer for the Nspire
« Reply #14 on: February 18, 2014, 08:44:57 pm »
ok cool. cant wait until next update!!!

edit: when do you think this will be ???
« Last Edit: February 18, 2014, 08:46:31 pm by nspireguy »