Skip to content
Permalink
Browse files

mupdf: support for mupdf-1.14

  • Loading branch information...
aligrudi committed Oct 18, 2018
1 parent e31a61b commit dfe9f0067549f759cdc04f2f62b4f89cd6e1b199
Showing with 6 additions and 5 deletions.
  1. +2 −2 Makefile
  2. +4 −3 mupdf.c
@@ -11,11 +11,11 @@ clean:

# pdf support using mupdf
fbpdf: fbpdf.o mupdf.o draw.o
$(CC) -o $@ $^ $(LDFLAGS) -lmupdf -lmupdfthird -lcrypto -lm
$(CC) -o $@ $^ $(LDFLAGS) -lmupdf -lmupdf-third -lmupdf-pkcs7 -lmupdf-threads -lm

# djvu support
fbdjvu: fbpdf.o djvulibre.o draw.o
$(CC) -o $@ $^ $(LDFLAGS) -ldjvulibre -ljpeg -lm -lstdc++ -lpthread
$(CXX) -o $@ $^ $(LDFLAGS) -ldjvulibre -ljpeg -lm -lpthread

# pdf support using poppler
poppler.o: poppler.c
@@ -17,9 +17,10 @@ void *doc_draw(struct doc *doc, int p, int zoom, int rotate, int *rows, int *col
fz_pixmap *pix;
fbval_t *pbuf;
int x, y;
fz_scale(&ctm, (float) zoom / 10, (float) zoom / 10);
fz_pre_rotate(&ctm, rotate);
pix = fz_new_pixmap_from_page_number(doc->ctx, doc->pdf, p - 1, &ctm, fz_device_rgb(doc->ctx), 0);
ctm = fz_scale((float) zoom / 10, (float) zoom / 10);
ctm = fz_pre_rotate(ctm, rotate);
pix = fz_new_pixmap_from_page_number(doc->ctx, doc->pdf,
p - 1, ctm, fz_device_rgb(doc->ctx), 0);
if (!pix)
return NULL;
if (!(pbuf = malloc(pix->w * pix->h * sizeof(pbuf[0])))) {

0 comments on commit dfe9f00

Please sign in to comment.
You can’t perform that action at this time.