Thanks for the reply. Is there a plan for adding the ability to compute the "bounding box" into PoDoFo?
On Wed, Jul 22, 2009 at 5:19 PM, Leonard Rosenthol<[email protected]> wrote: > There is no such thing as a margin in PDF. Text (and any other object) are > just drawn anywhere on a page that you wish. If there happens to be what you > (as a human) perceive as "white space" around such objects, that's simply > where the producer choose to draw them. It is possible to determine (though > not with PoDoFo at this time) the "bounding box" of all content on the page > and then compare that to the visible area of the page to determine if there > is any difference and if so, what size it is. > > The current version of PoDoFo does what is called "full embedding" - meaning > that every byte of the font is included in the PDF, hence the reason for the > large size. PDF also supports 'subset embedding' where only those glyphs > used in the text are stored in the PDF, but the work on that isn't complete > yet...when it is, your file size will go WAY down. > > Leonard > > -----Original Message----- > From: Trevor Kaufman [mailto:[email protected]] > Sent: Wednesday, July 22, 2009 5:10 PM > To: [email protected] > Subject: [Podofo-users] Margins and Fonts > > Hello, > > First of all, thank you for creating PoDoFo. Writing to existing PDFs > is a lot easier with PoDoFo then I ever thought it would be. > > Margins.. Most PDFs I've seen leave some space between the edge of the > "body" text and the edge of the page. This space I will call a margin > ( I don't know if there is an official PDF term..). I'd like to figure > out the width of the margins. As far as I can tell, there is no > PdfPage.GetMargins() and the quick look through I did on the PDF spec > didn't seem to mention any margins as I have defined them. The PDFs I > want to work with with either have a bunch of body text, or be a slide > (power point, etc) converted to PDF. I'd like to be able to find the > size of the margins in order to draw inside them. > > Fonts. I did a quick modification to the concept of the hello world > example that takes an existing PDF and adds some text to it. The size > of the PDF file tripled for a short line of text. I am assuming this > is because I embedded a new font when I added the text. If this is not > true... maybe this doesn't matter so much. Anyways, is there a way to > get the font(s) that are already embedded in a existing PDF and reuse > them? > > If this stuff is possible but not currently doable in the code, I am > open to helping provided it with some guidance. > > -- > Sincerely, > Trevor Kaufman > > ------------------------------------------------------------------------------ > _______________________________________________ > Podofo-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/podofo-users > -- -- Sincerely, Trevor Kaufman ------------------------------------------------------------------------------ _______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
