Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8215281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:43:48+00:00 2026-06-07T11:43:48+00:00

I am using mupdf to render PDFs in my c++ application but I also

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:43:50+00:00Added an answer on June 7, 2026 at 11:43 am

    The modification API in MuPDF is for editing the structure of a PDF (such as reordering pages, adding or removing annotations, etc) at a fairly low level. The graphics in PDF are based on a “content stream” object containing the commands for drawing a page using a subset of PostScript. There are no functions for editing these graphics content streams in MuPDF.

    However, if all you want to do is add an image on top of the page, you can do so by creating an annotation object for the page. You’ll need to create the PDF dictionary objects for the annotation, an image object, an appearance stream to draw the image object, and hook them up to the page. You’ll need a good understanding of the PDF format to do this though.

    You’ll want to use the latest git checkout of MuPDF since we’ve recently (post 1.0 release) added some convenient functions for editing objects and updating streams with new content.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cannot find fitz.c file in mupdf folders. I can find fitz.h but, for
I'm trying to render Pdfs pages into png files using Ghostscript v9.02. For that
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
I have two code examples below. One works, but the second (using extend to
Using Android TelephonyManager an application can obtain the state of data activity over the
using a binary search tree I need to add to a vector all int
Using WebViewBrush I can render web page content (it's screen shot) to e.g. Rectangle
I'm using Symfony and mPDF. I'm trying to integrate both but am running into
Using Xcode4.2.1, with a basic PhoneGap template based app. (I say template, but I
Using gcc and ld on x86_64 linux I need to link against a newer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.