Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: Legimet on November 29, 2013, 11:50:49 pm

Title: nPDF - A document viewer for the Nspire
Post by: Legimet 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 (https://gnu.org/licenses/gpl.html) or later.

(https://tiplanet.org/modules/archives/captures/1449537548x1421457693npdf.png.pagespeed.ic.f3cWs3Fmnj.png)
(Screenshot of opendatastructures.org (http://opendatastructures.org/))

Controls:

Download version 0.4 beta: http://ti-pla.net/a139503 (http://ti-pla.net/a139503)
Source code: https://github.com/Legimet/nPDF (https://github.com/Legimet/nPDF)
Title: Re: nPDF
Post by: critor on November 30, 2013, 06:09:04 am
Thanks.
What are the problems you ran in ?
Title: Re: nPDF
Post by: Le solutionneur 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!
Title: Re: nPDF
Post by: critor 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.
Title: Re: nPDF
Post by: Legimet 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! :)
Title: Re: nPDF
Post by: LDStudios on December 11, 2013, 04:08:52 pm
Cant wait to try it out :)
Title: Re: nPDF
Post by: Eiyeron 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...
Title: Re: nPDF
Post by: critor 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
Title: Re: nPDF
Post by: Legimet 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
Title: Re: nPDF
Post by: critor 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 ;)
Title: Re: nPDF
Post by: Le solutionneur on December 12, 2013, 12:20:49 pm
Well done :D
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet 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.
Title: Re: nPDF - A document viewer for the Nspire
Post by: nspireguy on February 18, 2014, 08:41:32 pm
this sounds good. will you be able to see pics that are in the pdf?
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on February 18, 2014, 08:41:51 pm
You already can ;)
Title: Re: nPDF - A document viewer for the Nspire
Post by: nspireguy on February 18, 2014, 08:44:57 pm
ok cool. cant wait until next update!!!

edit: when do you think this will be ???
Title: Re: nPDF - A document viewer for the Nspire
Post by: Roondak on February 18, 2014, 10:24:30 pm
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.
Sounds great, can't wait for your next update! Also, could it have an easy way of going to a certain page? Like instantly getting to page 48 of the Nspire manual, for example.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on February 18, 2014, 10:25:34 pm
Yes, I'll probably add that to the menu (but I need to make one first) and a keyboard shortcut.

Also I need to reduce the filesize. It is slowing down my workflow because it takes forever to send the file to nspire_emu.
Title: Re: nPDF - A document viewer for the Nspire
Post by: mdr1 on February 26, 2014, 09:59:11 am
Can't wait for the next update! I suggest to add page up/page down and to enable the scrolling with the touchpad.
Title: Re: nPDF - A document viewer for the Nspire
Post by: blauemauritius on March 07, 2014, 09:58:11 pm
Hi! I have tried to develop your version, but if i compile it, i got the error that the file "Memory.h" doesn't exist. Maybe a library is missing. Could you please help?

Thank you very much in advance!

Frank
Title: Re: nPDF - A document viewer for the Nspire
Post by: joeym on March 27, 2014, 09:45:37 pm
How is the progress on this coming along?

This will be an essential program for all owners of the Nspire. Keep at it we really need this.
Title: Re: nPDF - A document viewer for the Nspire
Post by: critor on March 28, 2014, 04:24:00 am
You allready have a working PDF solution, joeym, with mViewer GX:
http://tiplanet.org/forum/editgx.php
Title: Re: nPDF - A document viewer for the Nspire
Post by: joeym on March 29, 2014, 07:26:46 pm
Hi Critor,

Does it work if the PDF is just an image? I tried it but did not have success.

I wish there was some sort of documentation or explanation regarding how to use it. In my opinion it is not very straight forward.

What exactly does the Apply button do? Do I use Apply before hitting the Download button?

Once I logged into TI-Planet I filled in the Filename field and description field. I then browsed my machine to where the .pdf was located. I left Lua selected and then I hit the Apply button.

In the bottom left corner of my browser it says "Sending request to tiplanet.org..."

I have tried this quite a few times and it seems to timeout.

Does this mean to not hit the Apply button and instead hit the Download button?

Why is there a File 1 area on the page and a File 2 area? Please explain how to use it. What is the difference between File 1 and File 2? I am a non-French speaker.

I apologize if you think it is intuitive. I just do not seem to follow how to use it.

Thank you in advance.
Title: Re: nPDF - A document viewer for the Nspire
Post by: joeym on March 30, 2014, 12:01:50 am
Forget it Critor...I figured it out. It turns out it was pretty straight forward :) I was able to convert a .pdf for my Nspire.

But I am wondering if the pdf file is just an image if it still works?
Title: Re: nPDF - A document viewer for the Nspire
Post by: Streetwalrus on March 30, 2014, 03:07:06 am
Nice to see your issue solved but please do not double post. ;)
Title: Re: nPDF - A document viewer for the Nspire
Post by: quadratic77 on May 07, 2014, 11:12:17 am
Hello,

On my nspire CX CAS with ndless 3.6 and OS 3.6.0.546, when I run nPDF it runs fine the first time and freezes up the second time I try to run it. It freezes after about 10 seconds of the clock turning.

Could this be because of ndless 3.6 and nPDF uses 3.1 stuff (hooks, etc.)?
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on July 02, 2014, 09:40:08 pm
OK, I completely rewrote nPDF from scratch in C++ over the past few weeks, and I have now released nPDF 0.2.This release is much more stable and supports zooming and proper scrolling. It also uses MuPDF 1.5 which is faster. Next I'll add some keyboard shortcuts.

Source code is now on GitHub (https://github.com/Legimet/nPDF).

Binary: https://legimet.github.io/nPDF-0.2.7z
Source tarball: https://legimet.github.io/nPDF-0.2-src.tar.bz2
Title: Re: nPDF - A document viewer for the Nspire
Post by: Vogtinator on July 03, 2014, 05:52:12 am
Looks good! How's the speed like now? I can't test it myself until I'm at home..

However, I noticed, you're using nspire-ld for linking, which outputs ELF files and the attached binary is a bFLT file  ???
Title: Re: nPDF - A document viewer for the Nspire
Post by: Streetwalrus on July 03, 2014, 08:49:13 am
Cool to have you back Legimet ! :D Nice update too, never tried either version but I definitely should.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on July 03, 2014, 09:09:01 am
However, I noticed, you're using nspire-ld for linking, which outputs ELF files and the attached binary is a bFLT file  ???

I'm using an old commit of your Ndless fork. Do you think I should use Zehn by concatenating to the resources-loader? And can you add memory.h? It should just #include string.h.

Cool to have you back Legimet ! :D Nice update too, never tried either version but I definitely should.
Please don't try the old version :P It was a piece of junk, mostly copypasta'd from MuPDF example code. This version is actually usable and doesn't crash your calc. Also, I reduced the size by using a few macros that MuPDF lets you define to compile some fonts out.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Vogtinator on July 03, 2014, 10:27:17 am
However, I noticed, you're using nspire-ld for linking, which outputs ELF files and the attached binary is a bFLT file  ???

I'm using an old commit of your Ndless fork.
In your README.md is written:
Code: [Select]
Use Fabian Vogt's fork of Ndless, commit  ac7576f9cc2609789178270d86778a8e45b64464.which is the most recent commit.
Quote
Do you think I should use Zehn by concatenating to the resources-loader?
Exceptions will make your life much easier, and it will be a little bit faster (without -fPIE and -fPIC) ;)
There are two downsides though: Startup time will be a bit slower, the file would have to be loaded twice if .bss isn't included and debugging is only supported if you use Zehn without wrapper.
Of course you can simply elf2flt the generated .elf file, and you have both Zehn and bFLT :)

BTW: You can safely delete and delete[] nullptrs, so every if(ptr) delete ptr; is redundant.
Quote
And can you add memory.h? It should just #include string.h.
While you read this, it's already done :)

Edit: Some suggestions:
Code: [Select]
    void fillScreen(unsigned char c) {
for (int i = 0; i < SCREEN_WIDTH; i++) {
    for (int j = 0; j < SCREEN_WIDTH; j++) {
setPixel(c, i, j);
    }
}
    }
    void fillScreen(unsigned char r, unsigned char g, unsigned char b) {
for (int i = 0; i < SCREEN_WIDTH; i++) {
    for (int j = 0; j < SCREEN_WIDTH; j++) {
setPixel(r, g, b, i, j);
    }
}
    }
what about std::fill with custom pattern?

Code: [Select]
void setPixel(unsigned char c, int x, int y) {
// On color models, each pixel is represented in 16-bit high color
// On classic models, each pixel is 4 bits grayscale, 0 is black and 15 is white
if (0 <= x && x < SCREEN_WIDTH && 0 <= y && y < SCREEN_HEIGHT) {
    int pos = y * SCREEN_WIDTH + x;
Simple trick to increase performance sigificantly:
"unsigned int x, unsigned int y" obsoletes the comparision "0 <= x".

Code: [Select]
bool init() {
buf[0] = new unsigned char[SCREEN_BYTES_SIZE];
buf[1] = origBuf;
if (buf[0]) {
    if (std::atexit(deinit)) {
deinit();
return false;
    } else {
atexitCalled = true;
return true;
    }
} else {
    return false;
}
    }
Ever heard of global variables? (std::vector could work, too) :P
Title: Re: nPDF - A document viewer for the Nspire
Post by: DJ Omnimaga on July 03, 2014, 12:08:53 pm
Great to see this updated. I and a few others were worried that nPDF was dead. :)
Title: Re: nPDF - A document viewer for the Nspire
Post by: mdr1 on July 08, 2014, 12:39:16 pm
Great! Nice to see there's the zoom now and scrolling by letting the keys pressed.

Sometimes, it exits of the pdf, why? Is it the error handler that does so?

Anyway, thanks a lot! Though waiting for new features like searching, going to a specific page, using it from a basic function like in mViewer with mv().
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on July 08, 2014, 08:48:37 pm
Sometimes, it exits of the pdf, why? Is it the error handler that does so?

Yes, sometimes it runs out of memory and throws a MuPDF exception. I have to handle those exceptions.
Title: Re: nPDF - A document viewer for the Nspire
Post by: gerronon on July 10, 2014, 12:10:04 am
Would someone care to explain thoroughly how to install this for my CX? I'm new to this whole concept and i'm completely lost and have been trying for the last few hours! Thanks in advance!  :thumbsup: :thumbsup:
Title: Re: nPDF - A document viewer for the Nspire
Post by: Vogtinator on July 10, 2014, 02:47:20 pm
You just need to download the binary from this post (http://www.omnimaga.org/ti-nspire-projects/npdf-a-document-viewer-for-the-nspire/msg388514/#msg388514) and execute it on your calc. Then you can open .pdf files.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on July 10, 2014, 04:27:33 pm
Well, you should execute it once in the beginning to register the file extensions. Then you can click directly on .pdf files.

@Vogtinator: How can I run elf2flt on the .elf file? I'm running it with just the -o option, and all I get is a bunch of "bad reloc" messages. Maybe it would be better to wait until Zehn is merged into the official Ndless?
Title: Re: nPDF - A document viewer for the Nspire
Post by: Vogtinator on July 10, 2014, 04:47:24 pm
@Vogtinator: How can I run elf2flt on the .elf file? I'm running it with just the -o option, and all I get is a bunch of "bad reloc" messages.
It works for me by executing "arm-none-eabi-elf2flt -v -r -a crafti.elf -o crafti.bflt.tns", but the .elf needs to be linked with the old flags (-fno-exceptions, -fPIE). I didn't test whether it runs, though.

Quote
Maybe it would be better to wait until Zehn is merged into the official Ndless?
I'm working on that but that will take some time  :/  Currently ngc somehow crashes and most syscalls aren't listed (usb and TI_NN stuff not at all, for example). With the "resources-loader" it's perfectly usable though. And I need some testing whether there are some bugs I haven't found yet, I don't want to create a buggy undead tool like elf2flt ;)
Title: Re: nPDF - A document viewer for the Nspire
Post by: jhowlens on September 13, 2014, 03:52:51 pm
This doesn't work at all for me. Am i doing something wrong? Im running ndless 3.6 on a TI Nspire CX CAS w/ OS 3.6. I downloaded the nPDF binary file and dragged nPDF.tns to documents, and ran it. nPDF ran successfully and says that i should be able to open .pdf, .xps, and .cbz files. But when i try to open a pdf file it says file format not supported. The pdf in question im trying this out on is the "TI Nspire cx cas getting started guide". a 1.4mb file. i renamed the pdf extension to tns to get it on the calculator so does that have something to do with it?
Title: Re: nPDF - A document viewer for the Nspire
Post by: Vogtinator on September 13, 2014, 05:34:48 pm
Yes, the file has to have the extension "pdf.tns" to work, e.g. "document.pdf.tns" when you transfer it to your calculator.
Title: Re: nPDF - A document viewer for the Nspire
Post by: jhowlens on September 13, 2014, 05:44:31 pm
Thanks it works fine now. If i could make one feature request it would be to control the brightness. a black on white pdf is a bit overwhelming on the eyes.
Title: Re: nPDF - A document viewer for the Nspire
Post by: DJ Omnimaga on October 27, 2014, 05:48:20 pm
On a side note, Critor just released a fork of nPDF today. It's available at https://tiplanet.org/forum/archives_voir.php?id=104142 and includes most suggestions he submitted via Github.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Adriweb on October 27, 2014, 09:24:22 pm
Yeah he's using his fork while waiting for the PR to be merged (if/when they do), since it's useful features for the mViewer conversions (cf. news).
But I'm sure the PR will get approved, after all it's all improvements for the comfort of the users.
It's good to see open-source community projects being worked on [by several people, I mean], at least.
Title: Re: nPDF - A document viewer for the Nspire
Post by: DJ Omnimaga on November 02, 2014, 12:30:26 am
True, and considering the original author is hardly around anymore, making the original open-source was a good move after all. Of course, after what happened to Doors CS 7, I can understand why certain people would prefer to only give their source to a few select users in the TI community, but having it available in the first place allows the project to continue no matter what the original author do.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on November 02, 2014, 06:36:22 pm
I haven't been around much mainly because of school.

Anyway, I fixed another bug yesterday that triggered a crash on exit half the time, introduced by one of critor's bug fixes, which was a workaround for the fact that the Nspire's malloc returns a buffer that is 4-byte aligned, not 8. The screen buffer has to be 8-byte aligned. Now Vogtinator did a similar workaround in the SDK so programs don't have to deal with it. The only drawback is that now malloc allocates an extra 8 bytes for each call. It's not that much, though.
Title: Re: nPDF - A document viewer for the Nspire
Post by: DJ Omnimaga on November 02, 2014, 06:38:30 pm
Nice to see you around again. I was getting a bit worried you moved on to different interests or something.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on November 02, 2014, 07:20:19 pm
No, it's just school. Especially history :P
Title: Re: nPDF - A document viewer for the Nspire
Post by: bluepower9 on December 12, 2014, 01:17:01 am
how do you get this running on my calculator? i downloaded the binary thing but it won't run on my calculator
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 12, 2014, 10:25:33 pm
If you're using 3.6, make sure you have the latest version of Ndless. nPDF.tns should work. If you're using 3.1, nPDF.prg.tns should work (you can rename it if you want).
Title: Re: nPDF - A document viewer for the Nspire
Post by: bluepower9 on December 14, 2014, 01:05:22 am
If you're using 3.6, make sure you have the latest version of Ndless. nPDF.tns should work. If you're using 3.1, nPDF.prg.tns should work (you can rename it if you want).

when i download the binary, there is no nPDF.tns, there is only nPDF.7z so i cahnged it to nPDF.tns and tried running that but it didn't work
Title: Re: nPDF - A document viewer for the Nspire
Post by: torito3112 on December 14, 2014, 02:48:40 am
i gess that you have to decompress the nPDF.7z
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 14, 2014, 02:29:06 pm
Use the beta version at TI-Planet: https://tiplanet.org/forum/archives_voir.php?id=104142
Title: Re: nPDF - A document viewer for the Nspire
Post by: bluepower9 on December 14, 2014, 02:42:00 pm
oh i didn't realize it was a compressed file. are the controls messed up in binary file that u posted on page 2 of this thread? because i tried ctrl g, 3, and 9 to try and change pages and it did not work
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 17, 2014, 09:49:50 pm
Use the beta version: https://tiplanet.org/forum/archives_voir.php?id=104142. Those controls should work.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on January 16, 2015, 09:00:29 pm
I decided to release what I have as nPDF 0.3, and I'll start to work on new features. :)

Download version 0.3: http://ti-pla.net/a139503
Source code: https://github.com/Legimet/nPDF
Title: Re: nPDF - A document viewer for the Nspire
Post by: mdr1 on January 26, 2015, 11:21:19 am
Thanks a lot Legimet for this update! Going to a number of page is really usefull. I can't wait for the next features!
By the way, to make work it, I had to change the ndless.cfg and to replace .pdf=nPDF by .pdf=nPDF.prg
Title: Re: nPDF - A document viewer for the Nspire
Post by: Soocemib on January 27, 2015, 01:45:49 pm
Hello everyone !

The v0.3 doesn't work on my TI-nspire CX (non CAS)...
I install the "nPDF.tns" (2302 KB) file but I just got an error message saying that the format is not compatible.

I have the OS 3.6.0.550 and Ndless 3.6

Note that the v0.2 (3895 KB) works fine.

Thanks for your help !
Title: Re: nPDF - A document viewer for the Nspire
Post by: mdr1 on January 28, 2015, 03:08:21 am
Did you try to edit the ndless.cfg as I said just before your post?
Title: Re: nPDF - A document viewer for the Nspire
Post by: Vogtinator on January 28, 2015, 12:31:53 pm
You have to use "npdf.prg.tns" as you're not using the latest ndless version (you'll also have to change ndless.cfg.tns).
Title: Re: nPDF - A document viewer for the Nspire
Post by: Soocemib on January 28, 2015, 04:10:02 pm
Thanks guys, everything works just fine now.

Great job by the way !

++
Title: Re: nPDF - A document viewer for the Nspire
Post by: mechnesium on March 20, 2015, 04:27:19 pm
Hello! I'm a new user, just wanted to register to say thanks for all the work put into this app and to help out with development! This is one of the most valuable utilities for the Nspire. I hope to help find and fix any bugs :D I am on 3.9 with ndless.

I have noticed some minor speed issues and random slowdowns after excessive page browsing, zooming, and opening of different PDFs. I assume these are exceptions caused by running out of memory? After using it for a while, I got scared when I tried to open a PDF again, and the calc couldn't recognize it. It no longer recognized any .tns file, actually... even though ndless was still installed  ???. A reset and reinstallation of ndless fixed it, however.

Also, nPDF did cause a crash that uninstalled ndless. I'm sure all of these issues could be addressed in the future. There are occasional force closes of PDFs, but they simply need to be reopened. Sometimes the "go-to page" dialog doesn't appear but it still takes input. You have to be very slow and cautious with nPDF, and wait for it to work, or risk having a crash/error. Treat it with respect and it will respect you.

That's all I have for now  :) I submitted a pull request on the GitHub to fix a very minor error with the numpad scrolling.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on March 27, 2015, 03:20:41 pm
@mechnesium: I am not working on nPDF right now due to lack of time, but pull requests and bug reports are welcome :)
Title: Re: nPDF - A document viewer for the Nspire
Post by: Andre Guerreiro on April 28, 2015, 04:51:12 pm
help me plz!
I put my document like test.pdf.tns but not work
in CAS Software appears test.pdf.tns.pdf
how to get it works?

Edit:
Solved with that:

then in calculator i renamed to .pdf and it works
Title: Re: nPDF - A document viewer for the Nspire
Post by: mechnesium on May 05, 2015, 09:26:47 am
Awesome!

I used the program extensively for my open book tests in lieu of bringing my textbooks,  because I don't own the digital iterations of my textbooks. nPDF is fairly snappy when the calculator is overclocked.

However, it often runs completely out of memory after opening, closing, zooming and page-turning of many docs (or large docs), at the point which PDFs no longer open. For some reason, the memory does not recover after the PDFs have been opened. I do not know how to fix this issue short of resetting the calc and reinstalling ndless (a minor annoyance). If there is a way to clear the memory without resetting the calc, I would love to know! :)

I have a few ideas for the project that I might try to implement this summer. One would be a hotkey to make the screen black, to save battery power/prevent people from seeing the contents of your screen. Another would be the ability to view the current/total page.
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on November 03, 2015, 05:54:47 am
@mechnesium: I am not working on nPDF right now due to lack of time, but pull requests and bug reports are welcome :)
Hi Legimet, from your last message are skimmed through 7 months..
I discovered nspire's world from nearly a week, I'll receive my first CX CAS this one, but I'm just registered to the forum because I found your project very interesting : clicking on links on your website, I see that libraries you have included are often updated!
So I'm here to ask you if you could bring us a new version of the app (I think more recent muPDF's files could improving speed/scrolling during reading), or teaching me how to do it to keep the project alive :)
Title: Re: nPDF - A document viewer for the Nspire
Post by: davy39 on November 19, 2015, 05:06:31 am
+1
Same for me, I've just got a nspire yesterday and already enjoying ndless + nPDF  :)
Many thanks for your work.

I'm also wondering if your github's updates from june are effective. Is there a chance that we could benefit from muPDF upgrade and be able to read html and epub ?

Another request : could you implement a way to navigate between pdf's (and epub ?) bookmarks ?

Keep up the great job !
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on November 19, 2015, 06:55:35 am
@davy39 unfortunately I haven't found yet the time to downgrade to 3.6 due to exams :(
However I appreciate your proposals, @Legimet could give us a signal? :)
Title: Re: nPDF - A document viewer for the Nspire
Post by: davy39 on November 19, 2015, 09:27:02 am
I think I just have succeeded to build nPDF from lastest source from github (2015 Jun 24) (https://github.com/Legimet/nPDF/tree/768dec2d86c6c9c7cede1c65d23842cb0f3f4b66), let's name it v0.4 beta  :w00t:

It seems to be lighter than v0.3: 1.9Mo vs 2.4Mo.

It looks like it's working but had no time to compare both versions (today are my first steps with nspire...).
Maybe I was too much optimistic since I was not able to read an epub file.

Waiting from Legimet news, if anyone want to give a shot and report your experiences, the file is here (https://mega.nz/#!TVYSwbgB!4vFXR1UUgoFcD4a1cNbN9BBdenfdhpgWTcr4tZiBr1M).
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on November 25, 2015, 10:06:55 am
Thanks a lot Legimet for this update! Going to a number of page is really usefull. I can't wait for the next features!
By the way, to make work it, I had to change the ndless.cfg and to replace .pdf=nPDF by .pdf=nPDF.prg
You have to use "npdf.prg.tns" as you're not using the latest ndless version (you'll also have to change ndless.cfg.tns).
I'm on OS 3.9.1.38 ndless-ed yesterday : taking again ndless.cfg from it's zip I was finally able to open PDF (I had renamed it and before it gave me the error message of file not supported) but the problem is that after opening the file is blocked on first page, I can't do more such as scrolling or opening a menu.
I have to downgrade to 3.6, and overclock using Nover?
The file using as attempt isn't heavy, just 180Kb compressed online..

EDIT : I found controls https://github.com/Legimet/nPDF/blob/master/README.md
But when I zoom an area, I'm not able to scroll the whole pdf : suggestions?
Title: Re: nPDF - A document viewer for the Nspire
Post by: davy39 on November 25, 2015, 11:45:47 am
But when I zoom an area, I'm not able to scroll the whole pdf : suggestions?

I think as well that this behaviour is not very convenient, you have to scroll a page then press "+", scroll again, "+" ...

I've just made this request on github : https://github.com/Legimet/nPDF/issues/12
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on November 27, 2015, 02:36:44 pm
@davy39, @matteob92 Sorry for not replying, I just haven't been on Omnimaga lately. I noticed the GitHub issue, though.

You can see the explanation for the scrolling behavior here: https://github.com/Legimet/nPDF/issues/12
I updated nPDF to MuPDF 1.8. EPUB and HTML do not work at the moment because of this bug (http://bugs.ghostscript.com/show_bug.cgi?id=696326) in MuPDF.

I think I'll make a "0.4 beta" release soon, it's been a while since the last release.
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on November 27, 2015, 08:34:09 pm


@davy39, @matteob92 Sorry for not replying, I just haven't been on Omnimaga lately. I noticed the GitHub issue, though.

You can see the explanation for the scrolling behavior here: https://github.com/Legimet/nPDF/issues/12
I updated nPDF to MuPDF 1.8. EPUB and HTML do not work at the moment because of this bug (http://bugs.ghostscript.com/show_bug.cgi?id=696326) in MuPDF.

I think I'll make a "0.4 beta" release soon, it's been a while since the last release.

Don't worry my friend, I contacted you also through private message and in I first time I believed you would have been kidnapped, but yesterday I saw your answers on Github that heartened me :)
I read in minute detail the 3 new issues opened on nPDF page and my opinions are :
1) about scrolling behaviour I agree with your proposal of a config option leaving to the final user the choice to set scrolling mode as he prefer
2) about the epub reading, if I understood well you have an idea how to fix it, and also if it redoubles the size of nPDF.tns I think you could release a test build for giving this possibility to consumers that want to try epub dynamic rendering during zooming!
3) about the search function https://github.com/Legimet/nPDF/issues/13 when I run for the first time nPDF I was sure it would be yet implemented, I think it's a fundamental function and standing at your words that 'should be easy to do' I'm very faithful.
Your last release 0.3 is dated January of this year if I remember well, I would absolutely love a new beta version with the MuPDF updated (seems yet done standing at the Github), also because I'm very satisfied using that app to view PDFs into my Android devices, and in the meanwhile I received this comment from you I've crucified every developer or also user that could have helped teaching me how to update that blessed MuPDF library :)
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 02, 2015, 07:47:46 pm
Don't worry my friend, I contacted you also through private message and in I first time I believed you would have been kidnapped, but yesterday I saw your answers on Github that heartened me :)

No, I haven't been kidnapped :P

Your last release 0.3 is dated January of this year if I remember well, I would absolutely love a new beta version with the MuPDF updated (seems yet done standing at the Github)

I agree that the 0.3 release is outdated, so I plan to make a "0.4 beta" release tomorrow. I won't be able to add any more features, but it will be a somewhat significant update. I will also include a "-DNOCJKFULL" build that will support EPUB and HTML (but will be bigger).

I read in minute detail the 3 new issues opened on nPDF page and my opinions are :
1) about scrolling behaviour I agree with your proposal of a config option leaving to the final user the choice to set scrolling mode as he prefer
2) about the epub reading, if I understood well you have an idea how to fix it, and also if it redoubles the size of nPDF.tns I think you could release a test build for giving this possibility to consumers that want to try epub dynamic rendering during zooming!
3) about the search function https://github.com/Legimet/nPDF/issues/13 (https://github.com/Legimet/nPDF/issues/13) when I run for the first time nPDF I was sure it would be yet implemented, I think it's a fundamental function and standing at your words that 'should be easy to do' I'm very faithful.

After the 0.4 beta version is released, I will add support for searching and the 3 scrolling modes. As I said, I will include a larger-sized build with EPUB and HTML support in the beta version, but support in the smaller version is contingent on the resolution of this bug (http://bugs.ghostscript.com/show_bug.cgi?id=696326).

I'm very satisfied using that app to view PDFs into my Android devices, and in the meanwhile I received this comment from you I've crucified every developer or also user that could have helped teaching me how to update that blessed MuPDF library :)

I use the MuPDF Android app too! :D
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on December 03, 2015, 04:38:01 pm


1) I agree that the 0.3 release is outdated, so I plan to make a "0.4 beta" release tomorrow. I won't be able to add any more features, but it will be a somewhat significant update. I will also include a "-DNOCJKFULL" build that will support EPUB and HTML (but will be bigger).

2) After the 0.4 beta version is released, I will add support for searching and the 3 scrolling modes. As I said, I will include a larger-sized build with EPUB and HTML support in the beta version, but support in the smaller version is contingent on the resolution of this bug (http://bugs.ghostscript.com/show_bug.cgi?id=696326).

3) I use the MuPDF Android app too! :D

1) What a great news, I'm looking forward to try the new version :D
Can you advise any site or program to convert pdf files into epub?

2) Could I guess how much time do you think to need to implement both functions? I don't want to be on your's case, just ask because the next week I have an exam and the search function winds up being much useful to me :)

3) I love it, is the fastest I've found after a careful research https://play.google.com/store/apps/details?id=com.artifex.mupdfdemo
But I spotted also PDF Viewer included into Google Drive's app is light ;)
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 03, 2015, 05:16:30 pm
1) What a great news, I'm looking forward to try the new version :D
Can you advise any site or program to convert pdf files into epub?

I use calibre (http://calibre-ebook.com/), an ebook manager which lets you perform this through the GUI, as well as through a script called ebook-convert (http://manual.calibre-ebook.com/cli/ebook-convert.html).

2) Could I guess how much time do you think to need to implement both functions? I don't want to be on your's case, just ask because the next week I have an exam and the search function winds up being much useful to me :)

Sorry, I don't know when I will get the time to implement it. Also, it would be good advice not to rely on a calculator for the exam. ;)
Title: Re: nPDF - A document viewer for the Nspire
Post by: shaunny on December 03, 2015, 05:52:52 pm
Bahaha...indeed, I relied on for one today for old content that did not think would be covered but was heavily...pages blanking out and too much memory use...Should have put the things on my cheat sheet.  Live and learn. 
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on December 03, 2015, 06:26:00 pm
I use calibre (http://calibre-ebook.com/), an ebook manager which lets you perform this through the GUI, as well as through a script called ebook-convert (http://manual.calibre-ebook.com/cli/ebook-convert.html).
Sorry, I don't know when I will get the time to implement it. Also, it would be good advice not to rely on a calculator for the exam. ;)

Don't misunderstand my words : I don't rely on the calculator for the exam, I hate who pass in such way.
I'm studying night and day both verbal and training parts, my only thought is that it's always better owning a weapon that can turn out to be useful if necessary than haven't because formulas are (too) much, just it (maybe I wouldn't have written that words) ;)
Standing at your words implementing search and scrolling would have been easy, but I'll wait noiselessly, you'll have done yet a great work updating the library to 1.8 version (I hope pdf rendering would be improved by this update) :)
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 07, 2015, 08:36:49 pm
Sorry, I was caught up with school work. I have uploaded nPDF 0.4 beta. Since you requested it, a build is included that supports EPUB and HTML. :)

Also, you don't need to use the PRG file on OS 3.6. The ndless_resources.tns file from Ndless 3.9 that has Zehn support actually works on 3.1 and 3.6. Just replace your ndless_resources.tns with the one from 3.9, nPDF.tns should run. Unfortunately, this isn't well-documented.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Vogtinator on December 08, 2015, 12:22:34 am
Quote
Also, you don't need to use the PRG file on OS 3.6. The ndless_resources.tns file from Ndless 3.9 that has Zehn support actually works on 3.1 and 3.6. Just replace your ndless_resources.tns with the one from 3.9, nPDF.tns should run. Unfortunately, this isn't well-documented.
You can still use the PRG file, even if your ndless_resources supports Zehn. It will detect that automatically and load the Zehn part of the file directly.
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on December 08, 2015, 10:15:54 am
Quote
Also, you don't need to use the PRG file on OS 3.6. The ndless_resources.tns file from Ndless 3.9 that has Zehn support actually works on 3.1 and 3.6. Just replace your ndless_resources.tns with the one from 3.9, nPDF.tns should run. Unfortunately, this isn't well-documented.
You can still use the PRG file, even if your ndless_resources supports Zehn. It will detect that automatically and load the Zehn part of the file directly.
I'm using successfully the PRG file :D
Sorry, I was caught up with school work. I have uploaded nPDF 0.4 beta. Since you requested it, a build is included that supports EPUB and HTML. :)

Also, you don't need to use the PRG file on OS 3.6. The ndless_resources.tns file from Ndless 3.9 that has Zehn support actually works on 3.1 and 3.6. Just replace your ndless_resources.tns with the one from 3.9, nPDF.tns should run. Unfortunately, this isn't well-documented.
With nspire overclocked performances are radically improved : @234Mhz opening a document, zooming and scrolling is become fast and smooth, against stock frequency of 132Mhz I used before on Ndless 3.9
The new version seems great : as you revealed into post #72 searching and the 3 scrolling modes will be the tidbits, but before rendering a file I was accountable myself as an option that show the current page number and if possible also than of first and last page would give more importance to 'go to page' function that uses CTRL+G because could help us finding a whole part inside the document from what we remembered of it.
Do you think could be easy to implement? :)
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 08, 2015, 02:03:41 pm
You can still use the PRG file, even if your ndless_resources supports Zehn. It will detect that automatically and load the Zehn part of the file directly.

Yes, I know. Still, the Ndless 3.1 and 3.6 archives should be updated.

With nspire overclocked performances are radically improved : @234Mhz opening a document, zooming and scrolling is become fast and smooth, against stock frequency of 132Mhz I used before on Ndless 3.9
The new version seems great : as you revealed into post #72 searching and the 3 scrolling modes will be the tidbits, but before rendering a file I was accountable myself as an option that show the current page number and if possible also than of first and last page would give more importance to 'go to page' function that uses CTRL+G because could help us finding a whole part inside the document from what we remembered of it.
Do you think could be easy to implement? :)

I could add the first and last page shortcuts right now. Any suggestions for what they should be?
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on December 08, 2015, 03:35:17 pm
You can still use the PRG file, even if your ndless_resources supports Zehn. It will detect that automatically and load the Zehn part of the file directly.

Yes, I know. Still, the Ndless 3.1 and 3.6 archives should be updated.

With nspire overclocked performances are radically improved : @234Mhz opening a document, zooming and scrolling is become fast and smooth, against stock frequency of 132Mhz I used before on Ndless 3.9
The new version seems great : as you revealed into post #72 searching and the 3 scrolling modes will be the tidbits, but before rendering a file I was accountable myself as an option that show the current page number and if possible also than of first and last page would give more importance to 'go to page' function that uses CTRL+G because could help us finding a whole part inside the document from what we remembered of it.
Do you think could be easy to implement? :)

I could add the first and last page shortcuts right now. Any suggestions for what they should be?
I think we could call the shortcuts respectively 'prologue' and 'epilogue' using a literary key :)
But I mean also show the number of current page riproduce to help the user surfing the PDF's tree!
Title: Re: nPDF - A document viewer for the Nspire
Post by: Vogtinator on December 09, 2015, 10:12:59 am
You can still use the PRG file, even if your ndless_resources supports Zehn. It will detect that automatically and load the Zehn part of the file directly.

Yes, I know. Still, the Ndless 3.1 and 3.6 archives should be updated.
Or even better, point to the same file, containing the current release with all installers.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 09, 2015, 02:24:17 pm
I think we could call the shortcuts respectively 'prologue' and 'epilogue' using a literary key :)
But I mean also show the number of current page riproduce to help the user surfing the PDF's tree!

OK, but what do you think the actual keyboard shortcut should be?

Or even better, point to the same file, containing the current release with all installers.

That would also work, of course :)
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on December 11, 2015, 04:37:25 pm
I think we could call the shortcuts respectively 'prologue' and 'epilogue' using a literary key :)
But I mean also show the number of current page riproduce to help the user surfing the PDF's tree!

OK, but what do you think the actual keyboard shortcut should be?
I couldn't have replied before because from some days Tapatalk doesn't let me logging in also if username and password are correct (I have also just changed password, but always the same).
About the disposition, I'll think on to give you my advice :)
But recently I have betrayed the same problem described into issue #14 on your Github https://github.com/Legimet/nPDF/issues/14 : also if the PDF I've opened is compressed to maximum using an online service (ilovepdf) after nearly 30 pages the screen became suddenly white.
I think it runs out of memory, do you know how could be fixed this setback?
I believe would be useful including into the program a script to free RAM memory after the exit, because when I had showed this glitch then my calculator has started to lag becoming sluggish.
Title: Re: nPDF - A document viewer for the Nspire
Post by: shaunny on December 12, 2015, 05:49:28 pm
Agreed @ the White Screen Issues.  I tried to reproduce it after a reboot by loading a 14mb pdf and several 3mb pdfs and scrolling through fifteen pages of each but I could not.   I got bored at that point. Does nPDF only queue the next page?  I am not familiar with pdfs as a file structure.  When it happened a week ago I had not rebooted for a month so i do not know what remnant may have been lingering. 

An another note, just found out that those with Ndless 3.9 are not able to reboot their gonkulators w/o a 5v powered micro usb.  Is that in low power or hight power mode?  like a wall wart or a computer?  That sucks!   

Edit Sorunome: Merged double-posts
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 12, 2015, 07:55:25 pm
@shaunny, I will take a look at the issue.

Also, https://www.urbandictionary.com/define.php?term=gonkulator  XD
Title: Re: nPDF - A document viewer for the Nspire
Post by: shaunny on December 12, 2015, 09:40:25 pm
@shaunny, I will take a look at the issue.

Also, https://www.urbandictionary.com/define.php?term=gonkulator  XD

And I was a fan of Hogan's Heros in Nick at night...shame on me
Title: Re: nPDF - A document viewer for the Nspire
Post by: c4ooo on December 12, 2015, 09:56:34 pm
I couldn't have replied before because from some days Tapatalk doesn't let me logging in also if username and password are correct (I have also just changed password, but always the same).
Thats probably because of a new security mod suronome made for the website. I have heard some other sites also had talptalk problems with soru's mod ;)

Also lol i know this is like two years old, but a pdf viewer on calc is cool! I wonder if it will be possible on the monocrome calc  ::)
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 12, 2015, 11:38:32 pm
Also lol i know this is like two years old, but a pdf viewer on calc is cool! I wonder if it will be possible on the monocrome calc  ::)

In practice, there's not enough memory for nPDF to load most files on monochrome Nspires. :(
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on December 13, 2015, 08:18:13 pm
@shaunny, I will take a look at the issue.

Also, https://www.urbandictionary.com/define.php?term=gonkulator  XD
I'm sure you'll be able to fix it, also because our device has 64MB of RAM and OS would take only 16 of them :banghead:

@c4ooo unfortunately the problem goes on, I have to accessing through browser that is slow and uncomfortable  :-\
Title: Re: nPDF - A document viewer for the Nspire
Post by: ZioVen on December 18, 2015, 06:38:03 am
nPDF is awesome, great work mate! I use it on my CX CAS and it works great!  ;D ;D ;D
Title: Re: nPDF - A document viewer for the Nspire
Post by: shaunny on December 19, 2015, 09:54:07 pm
I've tested a bit more.  I believe it is crashing and rebooting based on the size of the pdf pages scanned ones that is.  I can load a 20mb 800page text fine but the 1.5mb 20page ones are causing the hiccup.
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on December 20, 2015, 07:50:22 pm
I couldn't have replied before because from some days Tapatalk doesn't let me logging in also if username and password are correct (I have also just changed password, but always the same).
Thats probably because of a new security mod suronome made for the website. I have heard some other sites also had talptalk problems with soru's mod ;)

Also lol i know this is like two years old, but a pdf viewer on calc is cool! I wonder if it will be possible on the monocrome calc  ::)
After today's update of Tapatalk app, I could again logging in from mobile :)
@Legimet : I saw you added label 9 days ago, had you found some time to analyze bug/suggestions? :)
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 20, 2015, 10:51:37 pm
nPDF is awesome, great work mate! I use it on my CX CAS and it works great!  ;D ;D ;D
Thanks  :)

I've tested a bit more.  I believe it is crashing and rebooting based on the size of the pdf pages scanned ones that is.  I can load a 20mb 800page text fine but the 1.5mb 20page ones are causing the hiccup.
Can you send me the file to reproduce this bug?

@Legimet : I saw you added label 9 days ago, had you found some time to analyze bug/suggestions? :)
Sorry, no. Unfortunately, my school seems to be cramming in projects before the break :(
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on December 30, 2015, 08:30:40 pm


Sorry, no. Unfortunately, my school seems to be cramming in projects before the break :(
I haven't seen recent activity on the Github, I hope that now that we are at the middle of the break you could find time to satisfy us
Title: Re: nPDF - A document viewer for the Nspire
Post by: shaunny on December 30, 2015, 10:11:06 pm
Satisfy seems like the wrong word.  I also forgot that I was to send over the offending document that was crashing npdf .4.  I will do that.
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on December 31, 2015, 05:01:43 am
Satisfy seems like the wrong word.  I also forgot that I was to send over the offending document that was crashing npdf .4.  I will do that.
Don't misunderstand my word, your document could be useful
Title: Re: nPDF - A document viewer for the Nspire
Post by: c4ooo on December 31, 2015, 01:40:08 pm
Also lol i know this is like two years old, but a pdf viewer on calc is cool! I wonder if it will be possible on the monocrome calc  ::)

In practice, there's not enough memory for nPDF to load most files on monochrome Nspires. :(
/me pretends that by "monochrome calc" he meant monochrome Nspires and not monochrome TI84+ :P

I Looked the Pdf format specification, and they where to confusing so i closed the page after about 2 minutes :P
I dont have an Nspire btw ;)
Title: Re: nPDF - A document viewer for the Nspire
Post by: P Walgode on January 14, 2016, 08:17:37 am
I don't know almost nothing about code. I only installed Ndless 4.0.3 on my CX CAS. I would like to install the nPDF 0.4 beta (I guess is the last one), and I get completly lost about what to do, cause I dont know how to work with ndless.
Can someone explain what I need to do?, if possible with some details cause i'm really bad with this things...
Title: Re: nPDF - A document viewer for the Nspire
Post by: neuronix on January 27, 2016, 11:38:00 am
Were is it possible to download the last version of nPDF?
Thank you in advance
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on February 12, 2016, 05:51:19 am
@Legimet : Have you finished your school projects? I think you could dedicate time to ours
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on March 18, 2016, 03:56:25 pm
Sorry, I haven't checked this thread in months. There are a few changes made since my last post here:

EPUB/HTML support: The bug in MuPDF has been fixed, and EPUB/HTML can now be opened without using the big version of nPDF including CJK fonts.
Find: You can now search for text. The controls are described in the README. This still needs some improvement.
HW-W support: I switched nPDF to using the new LCD API to support HW-W Nspires with the 240x320 rotated LCD.

More testing and bug fixing is needed, but since you've been waiting for so long, I have made a new beta release: https://github.com/Legimet/nPDF/releases
Title: Re: nPDF - A document viewer for the Nspire
Post by: Cambridge Cardon on March 21, 2016, 03:45:16 pm
So I downloaded ndless and npdf and followed the instructions, and it says "successful - you can now open .pdf and .xps etc" but, when I use the TI-Nspire computer link software to transfer my .pdf files over, it says I can only transfer .TNS files.

How do I put .pdf files on my device once I have the npdf software? I'm using OS 4.2 if that helps

Title: Re: nPDF - A document viewer for the Nspire
Post by: Ivoah on March 21, 2016, 03:48:16 pm
So I downloaded ndless and npdf and followed the instructions, and it says "successful - you can now open .pdf and .xps etc" but, when I use the TI-Nspire computer link software to transfer my .pdf files over, it says I can only transfer .TNS files.

How do I put .pdf files on my device once I have the npdf software? I'm using OS 4.2 if that helps
You need to rename them to filename.pdf.tns. The link software doesn't actually check what kind of file it is, just if it has the .tns extension.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Cambridge Cardon on March 21, 2016, 08:44:22 pm
It worked! Thanks
Title: Re: nPDF - A document viewer for the Nspire
Post by: Ivoah on March 21, 2016, 10:08:30 pm
It worked! Thanks
Hooray :D
Title: Re: nPDF - A document viewer for the Nspire
Post by: ImOnHere on March 30, 2016, 03:39:28 am
Hate to revive an old thread but I ran nPDF on my CX CAS and it said I can now view .pdf, .html, etc files. Only issue I am having is getting .pdf files onto my calculator. I'm using the TI-Nspire CX CAS Student Software on my laptop and it tells me that .pdf files are not supported. I tried to change the file name to "filename.pdf.tns" but the software turns it into "filename.pdf.tns.pdf". I'm a newb when it comes to these things, but I am running 4.2 if that helps at all, and I do have Ndless 4.2cascx running on my calculator.  ??? ???
Thanks!

---Don't know if it makes a difference but I am also running Windows 10
*****UPDATE: I got it working. Well, somewhat. My PDF is 16 pages long and about halfway through the screen goes white and shows nothing... Hmmmmm....
Title: Ctrl Tab
Post by: sumpm1 on May 03, 2016, 12:39:11 am
I don't know if npdf 0.4b is maintained by anyone here. But I switched to this version.

To "go to page," the hotkey was previously "ctrl + g," now it is "ctrl + tab."

The "goto function" is working well and consistently. But since you are hitting "tab," the cursor jumps out of the textbox where you should type the page you want.

Just a small gripe.

The only reason I looked for a newer version after using critor's for a good while, is the "goto function" was inconsistent. Sometimes it would appear, sometimes I would have to close the pdf and reopen.



Oh and for those having "white page" issues, I have found a workaround that works sometimes. Reopen the pdf, use "goto" select a page near where you want to go, and then it seems to work.

It seems like you get white pages after browsing several consecutive pages, so going 5 pages in can result in white page. It looks like the ram is maybe getting full and it doesn't dump old pages out of the memory.

Edit (Eeems): Merged double post.
Title: Re: nPDF - A document viewer for the Nspire
Post by: fgc2 on May 28, 2016, 07:57:07 am
Hello all!

I'm with 4.2 SO and already have de ndless and the npdf 0.4b . I'trs all been succesfully installed, but the problem comes when I try to send the documents to the calculator. The computer link recognises de .pdf file and don't let me tranfer the documents. All of you just change the name of the document for document.pdf.tns but in my case it only changes the name and the computer link still recognises that it's a pdf file (it appears documents.pdf.tns.pdf automatically). What should I do to fix this?

thanks, waiting for your answer.
Title: Re: nPDF - A document viewer for the Nspire
Post by: krytikul on June 19, 2016, 04:27:28 pm
It seems I've been able to fix the blank/white page issue. muPDF was set for unlimited memory allocation(FZ_STORE) and this caused some issues with larger documents. I've changed FZ_STORE to 16MB and it seems to play nicely now. All of the PDFs that gave me this issue seem to be fine now.

Attached is the tns for the patched version. I've also submitted a pull request on the GitHub for the project.

Please let me know if this works for you! Thanks 

nPDFv0.5b (https://cdn.discordapp.com/attachments/167408389050204162/194191190751445004/nPDFv0.5b.zip)
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on June 19, 2016, 11:33:07 pm
I thought I requested notifications for this thread, but I haven't received any. Anyway, I'll try to check this more frequently.

@sumpm1: That should be easy  to fix by adding one line, I will try to fix it by tomorrow.
@fgc2: This is usually an issue for Windows users, I think you have to change the settings in Windows Explorer (or whatever it is now) to show file extensions. Then you can replace the .pdf with .tns.
@krytikul: When I started this project I was having some issues (I don't remember what) with the FZ_STORE value and ended up setting it to unlimited. Hopefully it works, I will test the pull request.
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on March 10, 2017, 12:21:51 pm
Guys, I'm still on OS 3.9.1, now that Ndless is available also for the last 4.4 version it's time to update it.
Following the guide I can choose between 4.0.3, 4.2.0 and 4.4.0 version of the OS, anyone has tested the last available nPDF 0.5b with these?
Or @Legimet is planning an update of the .tns? On the Github page I see the last edit of the project is dated 7 months ago..
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on March 10, 2017, 01:18:19 pm
nPDF should work on OS 4.4, since it doesn't use any custom syscalls. I am planning an update at some point, but don't currently have the time.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Striker3 on April 19, 2017, 05:18:22 pm
Just wanted to say that nPDF works on OS 4.4 just fine.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Jonson26 on April 22, 2017, 08:11:09 am
Does it work with classic (greyscale, os 3.9.0) calcs?
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on April 22, 2017, 08:21:22 pm
It "works" on classic, but generally runs out of memory so it's not very usable. You can try it, though.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Jonson26 on April 23, 2017, 08:39:22 am
Thanks  :) .
Would memory optimisation be possible in the future?
Like lower picture resolution, or loading only one page at once?
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on April 25, 2017, 05:31:53 pm
I'm not really sure, I'll have to check.
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on September 13, 2017, 05:19:20 am
Hi Legimet, 2 weeks ago was released OS 4.5, 1 weeks ago a working Ndless.
I don't know how much spare time do you have for an update, but do you think the last version available would be compatible with the new operating system?
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on September 13, 2017, 02:40:25 pm
I haven't tried it, but tt should be compatible.
Title: Re: nPDF - A document viewer for the Nspire
Post by: matteob92 on September 18, 2017, 12:44:41 pm
I haven't tried it, but tt should be compatible.
Calculator just updated to OS 4.5.0.1180, everything is ok as expected.
Would require much time upgrading the MuPDF library? I had high hopes since March  :)
Title: Re: nPDF - A document viewer for the Nspire
Post by: Saigon2D on November 13, 2017, 11:33:06 pm
I been searching for hours with no luck on how to convert a .pdf to a .tns to move files onto my TI-Nspire. I have ndless and npdf, however I have no idea how to get the actual .pdf on my calculator. Can somebody please, please help me? All I get is the " an unsupported file was encountered. Only TI-Nspire (.tns) files may be sent to a connected handheld". I would really appreciate it if somebody could send me a link with instructions. Please and Thank you.



Hello all!

I'm with 4.2 SO and already have de ndless and the npdf 0.4b . I'trs all been succesfully installed, but the problem comes when I try to send the documents to the calculator. The computer link recognises de .pdf file and don't let me tranfer the documents. All of you just change the name of the document for document.pdf.tns but in my case it only changes the name and the computer link still recognises that it's a pdf file (it appears documents.pdf.tns.pdf automatically). What should I do to fix this?

thanks, waiting for your answer.

@fgc2 Did you ever get this resolved? I'm having the same issue

Edit (Eeems): Merged double post
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on November 15, 2017, 04:51:02 pm
You just have to add a .tns extension. The filename should look like "document.pdf.tns" If you're using WIndows Explorer (or whatever it's called nowadays) it might hide the extension and you will need to change a setting to not hide it. I don't know if this is still the case though.
Title: Re: nPDF - A document viewer for the Nspire
Post by: desmo916sp on December 02, 2017, 07:36:17 pm
I have a TI-Nspire CX .... I have the endless install 4.5.0, the resources and the CFG all installed .... I even transferred a PDF.tns file to the calculator ... still won't display PDF file.

Any Help is appreciated ... Matt in NC
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 02, 2017, 11:14:21 pm
What happens? Does it display an error message? Do other Ndless programs run?
Title: Re: nPDF - A document viewer for the Nspire
Post by: desmo916sp on December 04, 2017, 09:32:00 am
Just the standard ..... "this document format is not supported. ....... even after I add .tns .... opening PDF files is the only Extra thing I am looking to do with the calculator past its normal functions.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on December 04, 2017, 08:11:22 pm
OK, what happens when you try to open ndless_resources.tns on the calculator? Does an error message come up?
Title: Re: nPDF - A document viewer for the Nspire
Post by: hitux on January 03, 2018, 11:23:26 pm
I have ndless 3,6 installed and the nPDF works great I only have one problem when searching for text CRTL F. nothing happens after i type in the text.
Title: Re: nPDF - A document viewer for the Nspire
Post by: Legimet on January 03, 2018, 11:40:03 pm
Ctrl and F should be pressed at the same time.
Title: Re: nPDF - A document viewer for the Nspire
Post by: datsun72 on February 25, 2018, 06:00:50 pm
It seems I've been able to fix the blank/white page issue. muPDF was set for unlimited memory allocation(FZ_STORE) and this caused some issues with larger documents. I've changed FZ_STORE to 16MB and it seems to play nicely now. All of the PDFs that gave me this issue seem to be fine now.

Attached is the tns for the patched version. I've also submitted a pull request on the GitHub for the project.

Please let me know if this works for you! Thanks 



nPDFv0.5b (https://cdn.discordapp.com/attachments/167408389050204162/194191190751445004/nPDFv0.5b.zip)
Hi, I tried this unfortunately I am getting white pages still. I am on OS3_6.

Thanks!