<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:969092023;
        mso-list-template-ids:-1884530588;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1
        {mso-list-id:1602180399;
        mso-list-template-ids:2042554078;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The method you are using is REALLY BROKEN!&nbsp;&nbsp; <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Are you also copying all the resources over all well?&nbsp; &nbsp;How do you handle resources used by Form XObjects or Patterns?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Leonard<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> poppler-bounces+leonardr=adobe.com@lists.freedesktop.org [mailto:poppler-bounces+leonardr=adobe.com@lists.freedesktop.org] <b>On Behalf Of </b>Andreas Butti<br><b>Sent:</b> Wednesday, May 11, 2011 11:36 PM<br><b>To:</b> Albert Astals Cid; poppler@lists.freedesktop.org<br><b>Subject:</b> Re: [poppler] Direct Poppler access without frontend allowed?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Ok, I can provide my code, but I need some help to complete integrate with Poppler.<br><br>What I did now:<br>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.<br>Not all source PDFs are used always, and sometimes PDF Pages are used twice.<br><br><br>My code does the following:<o:p></o:p></p><ul type=disc><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1'>Extract the contents stream of the pages<o:p></o:p></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1'>Append the stream from one page to the other page<o:p></o:p></li><ul type=circle><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level2 lfo1'>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<o:p></o:p></li></ul><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1'>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)<o:p></o:p></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1'>Write metadata (Creator, Autor, Creationdate etc.)<o:p></o:p></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1'>Writeout the document to a file<o:p></o:p></li><ul type=circle><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level2 lfo1'>Create new XREF table<o:p></o:p></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level2 lfo1'>compress the contents of the pages with GZ<o:p></o:p></li></ul></ul><p class=MsoNormal><br><br>My application is mostly written in C++, but I use GTK (no discussion about this combination;-)).<br><br>So I first used the GLib frontend, but there I had problems with searching, and I cannot access the underlying poppler objects.<br><br><br>The Question is now which frontend I should use.<br><br><br>In my opinion, the best solution is may to create a new frontend, e.g. a PDF-editing frontend?<br><br>Because then it's possible to change some behaviour, and add other things, like:<o:p></o:p></p><ul type=disc><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo2'>Edit text within PDF documents (not add, add is no problem with merging)<o:p></o:p></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo2'>Delete objects from a PDF (e.g. select a rectangle and delete all objects within this rectangle)<o:p></o:p></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo2'>Copy objects<o:p></o:p></li></ul><p class=MsoNormal>Currently there is no easy to use application which support these 3 operations for Linux.<br><br>If poppler would have such a frontend I'll may append this functionality to Xournal++ (in the future, not now).<br><br><br>What do you think about this?<br><br><br><br><br>Andreas<br><br>Am 11.05.2011 21:43, schrieb Albert Astals Cid: <o:p></o:p></p><pre>A Wednesday, May 11, 2011, Andreas Butti va escriure:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Hello everybody<o:p></o:p></pre></blockquote><pre><o:p>&nbsp;</o:p></pre><pre>Hi<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre><o:p>&nbsp;</o:p></pre><pre>I'm working on a new Xournal version (Xournal++, not yet present on a<o:p></o:p></pre><pre>webpage, only in the SVN).<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>I used Poppler to display PDF and also for PDF export, to implement the<o:p></o:p></pre><pre>PDF export (merging two PDFs together) I access Poppler without any<o:p></o:p></pre><pre>frontend.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>I'm working on Ubuntu, which contain all necessary headers, but other<o:p></o:p></pre><pre>distributions don't.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Now there is a discussion if it's allowed to access Poppler without<o:p></o:p></pre><pre>frontend, or not.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>I thought it should be allowed, because on the poppler Wiki are also two<o:p></o:p></pre><pre>projects listed which access poppler without frontent,<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>But now I need a clear answer if it's allowed or not, and if not if<o:p></o:p></pre><pre>there is another way for me to implement this without breaking any rules.<o:p></o:p></pre></blockquote><pre><o:p>&nbsp;</o:p></pre><pre>It is not encouraged since we reserve the right to change the API (and do so) <o:p></o:p></pre><pre>at any release (minor versions included) while our API in the frontends is <o:p></o:p></pre><pre>much more stable.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>If you tell us what you are missing from the public frontend API we might add <o:p></o:p></pre><pre>it, or you might even contribute the code you have that uses the internal API <o:p></o:p></pre><pre>so we add it to our frontend ;-)<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Albert<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre><o:p>&nbsp;</o:p></pre><pre>Thank you for the answer.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Andreas<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>poppler mailing list<o:p></o:p></pre><pre><a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><o:p></o:p></pre><pre><a href="http://lists.freedesktop.org/mailman/listinfo/poppler">http://lists.freedesktop.org/mailman/listinfo/poppler</a><o:p></o:p></pre></blockquote><pre>_______________________________________________<o:p></o:p></pre><pre>poppler mailing list<o:p></o:p></pre><pre><a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><o:p></o:p></pre><pre><a href="http://lists.freedesktop.org/mailman/listinfo/poppler">http://lists.freedesktop.org/mailman/listinfo/poppler</a><o:p></o:p></pre></div></body></html>