2009/7/22 Trevor Kaufman <enda...@gmail.com>: > 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.
You can use ghostscript (gs -sDEVICE=bbox) to get the bbox of the non-white area. Leonard has explained the idea of "margins" in PDF. > 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 you intend to use a lot of of fonts (or want to include pdfs with fonts), you should look at pdftex/luatex. We've spent years on getting subsetting etc. right, especially with included pdfs. Best Martin PS: I'm not dissing PoDoFo - these are simply areas where other applications already deliver what's needed. ------------------------------------------------------------------------------ _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users