Coder Social home page Coder Social logo

aligrudi / fbpdf Goto Github PK

View Code? Open in Web Editor NEW
186.0 12.0 30.0 61 KB

A small framebuffer pdf, djvu, epub, xps, and cbz viewer

Home Page: http://litcave.rudi.ir/

License: BSD 3-Clause "New" or "Revised" License

Makefile 2.94% C 86.76% Roff 10.29%
framebuffer pdf djvulibre mupdf xpdf c

fbpdf's Introduction

FBPDF
=====

Fbpdf is a framebuffer pdf and djvu viewer.  There are three make
targets: fbpdf uses mupdf library for rendering pdf, fbpdf2 uses
poppler for the same purpose, and fbdjvu uses djvulibre library for
rendering djvu files.  The following options are available in all
three programs:

  fbpdf [-r rotation] [-z zoom_x10] [-p page_number] file.pdf

The following table lists the commands available in fbpdf.  Most of
them accept a numerical prefix.  For instance, '^F' tells fbpdf to
show the next page while '5^F' tells it to show the fifth next page.

==============	================================================
KEY		ACTION
==============	================================================
^F/J		next page
^B/K		previous page
G		go to page (the last page if no prefix)
o		set page number (for 'G' command only)
O		set page number and go to current page
z		zoom; prefix multiplied by 10 (i.e. '15z' = 150%)
r		set rotation in degrees
i		print some information
I		invert colors
q		quit
^[/escape 	clear the numerical prefix
mx		mark page as 'x' (or any other letter)
'x		jump to the page marked as 'x'
`x		jump to the page and position marked as 'x'
j		scroll down
k		scroll up
h		scroll left
l		scroll right
[		align with the left edge of the page
]		align with the right edge of the page
{		align with the leftmost character on the page
}		align with the rightmost character on the page
H		show page top
M		centre the page vertically
L		show page bottom
C		centre the page horizontally
^D/space	page down
^U/^H/backspace	page up
^L		redraw
e		reload current file
f		zoom to fit page height
w		zoom to fit page width
W		zoom to fit page contents horizontally
Z		set the default zoom level for 'z' command
d		sleep one second before the next command
==============	================================================

fbpdf's People

Contributors

aligrudi avatar kaction avatar max-p-log-p avatar xlucn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fbpdf's Issues

Linking fbpdf against mupdf may be a copyright violation

Disclaimer: IANAL, *GPL is horribly controversial and I might be wrong (but I don't think I am)

mupdf is licensed under AGPL terms. Per these terms, any program linking against it (either statically or dynamically), must also be released as AGPL. Releasing fbpdf under BSD is a violation of mupdf license. For this reason, Artifex could extort you or your users into buying a commercial mupdf license.

Now, I'm not sure how to fix it. The 'obvious' solution would be to license fbpdf separately as AGPL. However, I'm not sure if AGPL doesn't require covering other files in the package, particularly the Makefile. Since you have poppler-based fbpdf2, removing fbpdf or splitting it to a separate package may be a better option.

Can't Compile Debian Buster 10.

Back again, maybe an install readme with dependencies listed would help etc?
I have done
git clone https://github.com/aligrudi/fbpdf.git
make 2> mybuild.txt
and I get on screen
cc -c -Wall -O2 -I./include fbpdf.c
cc -c -Wall -O2 -I./include mupdf.c
cc -c -Wall -O2 -I./include draw.c
cc -o fbpdf fbpdf.o mupdf.o draw.o -L./lib -lmupdf -lmupdf-third -lmupdf-pkcs7 -lmupdf-threads -lm
and in mybuild.txt
/usr/bin/ld: cannot find -lmupdf-pkcs7
/usr/bin/ld: cannot find -lmupdf-threads
collect2: error: ld returned 1 exit status
make: *** [Makefile:14: fbpdf] Error 1

if I remove -lmupdf-pkcs7 -lmupdf-threads get a load of undefined.
btw Buster is using mupdf 1.14 (whereas on Debian 9 I had issue with older muppdf)
There are no include, or lib folders.
Am I missing a step or a dependency?

Not a bug: fantastic project!

Hello, just wanted to say how much I enjoy your FBPDF, FBFF, and NEATCC projects. Very well done!

I thought you might be interested to know that I ported both FBPDF and FBFF to Microwindows (a small-footprint graphical windowing system that runs on framebuffer, as well as other environments).I took your nicely-designed fb_ api in draw.c and made a few changes so they are identical across FBPDF and FBFF, and moved the keyboard input processing out of the main application into it as well so they are now portable across both environments.

Then, nxdraw.c was added to replace draw.c for the Nano-X environment, which handles some basic window creation, but uses the Nano-X capability of drawing directly into a memory-mapped window framebuffer such that the main application still uses the original fb_ api. All in all, pretty cool and very fast thanks to your neat design.

Now, the nxdraw.c and draw.c files are identical across the FBFF/FBPDF applications, and allow running on framebuffer or Nano-X with a quick change to the Makefile. I forked both projects and the code is there, in case you're interested. A couple bug fixes were made that causes core dumps with no audio playback, and width and height seperate zooms added.

Here's a screenshot of FBPDF running on OSX on Nano-X on SDL, no need to do anything, just wanted to say thanks!!

fbpdf-nano-X

can't compile, "fatal error: mupdf/fitz.g and much other things

Git version. Any idea ?

mupdf.c: In function ‘doc_draw’:
mupdf.c:22:8: error: too many arguments to function ‘fz_new_pixmap_from_page_number’
pix = fz_new_pixmap_from_page_number(doc->ctx, doc->pdf, p - 1, &ctm, fz_device_rgb(doc->ctx), 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:58:0,
from mupdf.c:3:
/usr/include/mupdf/fitz/util.h:22:12: note: declared here
fz_pixmap *fz_new_pixmap_from_page_number(fz_context *ctx, fz_document *doc, int number, const fz_matrix *ctm, fz_colorspace *cs);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mupdf.c:30:43: error: ‘fz_pixmap {aka struct fz_pixmap_s}’ has no member named ‘stride’; did you mean ‘storable’?
unsigned char *s = &pix->samples[y * pix->stride];
^~
Makefile:8 : la recette pour la cible « mupdf.o » a échouée
make: *** [mupdf.o] Erreur 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.