Editing a PDF with MuPDF

I am using mupdf to render PDFs in my c++ application but I also need to edit PDFs (inserting a picture for example) but I cannot for the life of my figure out how - it's not documented very well. Ghostscript says that there is an API in mupdf to modify PDFs here http://www.ghostscript.com/MuPDF.html.Ultimately I am hoping to be able to edit PDFs using MuPDF rather than using another library.Any help would be appreciated, thanks!...Read more

How to insert image in mupdf library

I am using mupdf to sign a pdf.And I succeed to sign a annotation in pdf with function "pdf_update_ink_appearance"Now I'm trying to insert an image into pdf.I add below codes to insert image:image = fz_new_image_from_file(ctx, "/storage/emulated/0/a.jpg");fz_fill_image(ctx, dev, image, &page_ctm, 1.0f);And the image doesn't show up in pdf.I try another method, but the image also can't show up in pdf.How to add a transparent image to PDF with mupdf using SMask?Can anyone help this situation?Thanks....Read more

mupdf-tools don't install mudraw

When i try to install mupdf-tools, it won't install mudraw.If i type in terminal "dpkg -L mupdf-tools" i get the following output:/./usr/usr/share/usr/share/doc/usr/share/doc/mupdf-tools/usr/share/doc/mupdf-tools/README/usr/share/doc/mupdf-tools/copyright/usr/share/doc/mupdf-tools/changelog.Debian.gz/usr/share/man/usr/share/man/man1/usr/share/man/man1/mutool.1.gz/usr/bin/usr/bin/mutoolAs can be seen, mudraw don't appear in the list.How can i fix this so i will have mudraw?I'm using ubuntu....Read more

Mupdf: how to reset the resolution of pdf view page PROPERLY when the CDialogEx(MFC) OnSize?

my pdf file is rendering in a CDialogEx(it's MFC Class),and what i want is to reset the resolution when the Dialog resized.....I find a solution via the mupdf offical downloads site:first set the desired resolution with pdfapp_setresolution(...), then call pdfapp_reloadpage(...). This reaches my goal but not perfect, with this method the displaying dialog gets a conspicuous redrawing (first the background color, then recovered back normal)...anybody have a better optimization? thanks...Read more

android mupdf build cannot find -ljbig2dec

i follow this [step] (Integrate MuPDF Reader in an app)! and i get this error in cygwin. please help...i'm stuckASUS@ASUS-PC /cygdrive/c/Users/ASUS/Documents/resources/Library/mupdf-0.9$ make generateCC build/debug/cmapdump.oLINK build/debug/cmapdump/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -ljbig2deccollect2: ld returned 1 exit statusMakefile:46: recipe for target `build/debug/cmapdump' failedmake: *** [build/debug/cmapdump] Error 1...Read more

How to build shared MuPDF library?

MuPDF by default should build static library, according to bit older Makfile and Internet sources. I now wanted to build MuPDF shared library which is needed by other project, and it doesn't even include rule for static library in current Makefile.As can be seen it includes rule only for libfitz.a (maybe mupdf library is included in it, I don't know, as except browsing source code I don't see any documentation)Just in case, I added -fPIC in CFLAGS variable in Makerules file, but I didn't get anything except static libfitz.a library and variou...Read more

MuPDF get every image coordinates from pdf page

As the title say's i want to retrive all the coordinates of the images that are inside the pdf page. What i tried until now is: dev = fz_new_text_device(ctx, sheet, page); fz_disable_device_hints(dev , FZ_IGNORE_IMAGE); fz_run_page(doc, pg->currentPage, dev , &ctm, NULL); // iterate over the page_blocks (can be image and text); fz_page_block *block; for (block = page->blocks; b...Read more