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.

Leonard

From: [email protected] 
[mailto:[email protected]] On Behalf Of 
Andreas Butti
Sent: Wednesday, May 11, 2011 11:36 PM
To: Albert Astals Cid; [email protected]
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?




Andreas

Am 11.05.2011 21:43, schrieb Albert Astals Cid:

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

Hello everybody



Hi





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

frontend.



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 ;-)



Albert





Thank you for the answer.





Andreas



_______________________________________________

poppler mailing list

[email protected]<mailto:[email protected]>

http://lists.freedesktop.org/mailman/listinfo/poppler

_______________________________________________

poppler mailing list

[email protected]<mailto:[email protected]>

http://lists.freedesktop.org/mailman/listinfo/poppler
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to