[poppler] Direct Poppler access without frontend allowed?

Leonard Rosenthol lrosenth at adobe.com
Sun May 15 07:14:46 PDT 2011

Form XObjects (ISO 32000-1, 8.10) are an encapsulation method of PDF content.  It is a well defined transformation from PDF page (32000-1, to Form XObject.


From: Andreas Butti [mailto:andreasbutti at gmail.com]
Sent: Sunday, May 15, 2011 7:06 AM
To: Leonard Rosenthol
Cc: Albert Astals Cid; poppler at lists.freedesktop.org
Subject: Re: [poppler] Direct Poppler access without frontend allowed?

Am 15.05.2011 16:01, schrieb Leonard Rosenthol:
The method you are using is REALLY BROKEN!

Are you also copying all the resources over all well?   How do you handle resources used by Form XObjects or Patterns?

The correct way to do this is to simply turn one of the pages into a Form XObject for the other page and then draw it.

I don't understand what you're meaning.

Is there an simpler way to merge the PDFs together?



From: poppler-bounces+leonardr=adobe.com at lists.freedesktop.org<mailto:poppler-bounces+leonardr=adobe.com at lists.freedesktop.org> [mailto:poppler-bounces+leonardr=adobe.com at lists.freedesktop.org] On Behalf Of Andreas Butti
Sent: Wednesday, May 11, 2011 11:36 PM
To: Albert Astals Cid; poppler at lists.freedesktop.org<mailto:poppler at lists.freedesktop.org>
Subject: Re: [poppler] Direct Poppler access without frontend allowed?

Ok, I can provide my code, but I need some help to complete integrate with Poppler.

What I did now:
I have two PDFs, one for background and one for the foreground, like two slides on a overhead projector, the second slide is on top of the first slide. Sometimes there are two pages, 1 foreground and one background, sometimes there is only one PDF.
Not all source PDFs are used always, and sometimes PDF Pages are used twice.

My code does the following:

 *   Extract the contents stream of the pages
 *   Append the stream from one page to the other page
    *   update all references, e.g. images and fonts, because /F1 in one document is may not the same font than /F1 in the other document
 *   Write outlines to the document (they have to be created by the application, because if there are pages inserted / deleted, I cannot use the original outlines)
 *   Write metadata (Creator, Autor, Creationdate etc.)
 *   Writeout the document to a file
    *   Create new XREF table
    *   compress the contents of the pages with GZ

My application is mostly written in C++, but I use GTK (no discussion about this combination;-)).

So I first used the GLib frontend, but there I had problems with searching, and I cannot access the underlying poppler objects.

The Question is now which frontend I should use.

In my opinion, the best solution is may to create a new frontend, e.g. a PDF-editing frontend?

Because then it's possible to change some behaviour, and add other things, like:

 *   Edit text within PDF documents (not add, add is no problem with merging)
 *   Delete objects from a PDF (e.g. select a rectangle and delete all objects within this rectangle)
 *   Copy objects
Currently there is no easy to use application which support these 3 operations for Linux.

If poppler would have such a frontend I'll may append this functionality to Xournal++ (in the future, not now).

What do you think about this?


Am 11.05.2011 21:43, schrieb Albert Astals Cid:

A Wednesday, May 11, 2011, Andreas Butti va escriure:

Hello everybody


I'm working on a new Xournal version (Xournal++, not yet present on a

webpage, only in the SVN).

I used Poppler to display PDF and also for PDF export, to implement the

PDF export (merging two PDFs together) I access Poppler without any


I'm working on Ubuntu, which contain all necessary headers, but other

distributions don't.

Now there is a discussion if it's allowed to access Poppler without

frontend, or not.

I thought it should be allowed, because on the poppler Wiki are also two

projects listed which access poppler without frontent,

But now I need a clear answer if it's allowed or not, and if not if

there is another way for me to implement this without breaking any rules.

It is not encouraged since we reserve the right to change the API (and do so)

at any release (minor versions included) while our API in the frontends is

much more stable.

If you tell us what you are missing from the public frontend API we might add

it, or you might even contribute the code you have that uses the internal API

so we add it to our frontend ;-)


Thank you for the answer.



poppler mailing list

poppler at lists.freedesktop.org<mailto:poppler at lists.freedesktop.org>



poppler mailing list

poppler at lists.freedesktop.org<mailto:poppler at lists.freedesktop.org>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110515/b0fc8fd5/attachment-0001.htm>

More information about the poppler mailing list