[Poppler-bugs] [Bug 71213] Add new PDFWriter class for writing PDF with printing options

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Nov 29 05:02:52 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=71213

--- Comment #31 from Marek Kasik <mkasik at redhat.com> ---
(In reply to comment #19)
> (In reply to comment #18)
> >   for (int i = 0; i < (int)pages.size(); i++) {
> >-    pageNum = pages[i];
> >+    pageNum = pages[i]->getNum();
> >+    doc = pages[i]->getDoc();
> >     if (pageSet == ALL ||
> >         (pageSet == ODD && outputPageNum % 2 == 1) ||
> >         (pageSet == EVEN && outputPageNum % 2 == 0)) {
> >       Object pageObj;
> >       Ref *refPage = doc->getCatalog()->getPageRef(pageNum);
> >       doc->getXRef()->fetch(refPage->num, refPage->gen, &pageObj);
> >-      markPageObjects(pageObj.getDict(), numberUp > 1 ? gFalse : gTrue);
> >+      markPageObjects(doc, pageObj.getDict(), numberUp > 1 ? gFalse : gTrue);
> >       if (fontEmbedRequired)
> >-        replaceNonEmbeddedFonts(pageObj.getDict(), &pageObj, *refPage);
> >+        replaceNonEmbeddedFonts(doc, pageObj.getDict(), &pageObj, *refPage);
> >       pageObj.free();
> >     }
> 
> I don't see how this works. The objects from each document will be mixed
> together and overwrite each other. All pages from each document need to be
> marked and written separately with an offset applied to the object numbering
> of each document to prevent the object numbers from clashing.

I checked just order of pages, I forgot to look at individual streams.


> I have already updated my patches to include multiple documents but am still
> reworking the font embedding patch. I wanted to get it all working before
> reposting but I'll go ahead and post what I already have working.

Thank you.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20131129/f7782101/attachment-0001.html>


More information about the Poppler-bugs mailing list