Hello podofo
----
It’s quite a long time ago since I was last time on this site. 2005 I
found another solution but this time I’m willing to learn more about
podofo.
So I started up my compiler and begun to write some lines. I’m also
not the hero in c++...
My program is close to podofoimpose. My program works like that:
// abstraction
PdfStreamedDocument document("tst.pdf")
A4 = document.CreatePage(A4)
PdfXObject XO(*mDoc, 1, &document);
(+ more PdfXObject objects with other mDocs)
painter->SetPage(A4);
painter->SetClipRect(0,0,300,300);
painter->DrawXObject (0, 0, XO,1);
(+ more DrawXObject)
painter->FinishPage();
document.Close();
That works fine! Perfect! Thanks to all pofofo developers! But now
I’ve got a problem; the file is quite huge. Around 90 MB. I open it in
acrobat save it again and it's around 0.6 MB.
I had a look at podofoimpose. I think the problem is, that every
single time I write a XObject I also write all fonts, resources... in
the file. I think in podofoimposer you avoid that with a algorithm
witch seams complex and as far as I can see it uses a few "hacks" with
writing the new XObjects first in de Source-File and then do something
with the resources (?).
My question now is; is there a easy way for doing that miraculous
optimization with the painter? painter is more my level, because I
don't know that much about the internal structure of pdf (until now).
Or maybe someone can help me with a general plot to implement an
optimization like Acrobat do. Like that:
1. Write the whole doc with the huge XObjects
2. Compare each XObject against the resources already included and
eliminate duplications
3. Save the new file
Any ideas or suggestions?
Thanks a lot.
stefan huber
p.s.: The actual svn can't compile with the xcode poject. For example
impositionplan.cpp uses "unit" and my compiler is confused with that.
Also it mention that there are "usin obsolete bindings at 'i'" for the
"for"-loop
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users