Thanks for your response, Michal. >> But occasionally, I receive a PDF file with enormous white margins. >> In such cases, I want to crop the pages down to the bounding box >> before resizing and rescaling the page. >> > Maybe just a terminology but what do you mean by the bounding box? I > guess what you actually mean is the media size (aka paper size). You > will get this value by page_dict.property( "MediaBox" ) and you can > change it by modifying the given rectangle. >
By "bounding box," I mean the "page bounding box" that Ghostscript returns when you run: gs -dSAFER -dNOPAUSE -dBATCH -q -r72 -sDEVICE=bbox -f filename.pdf > Btw. do you want this to be automatical? (determine the text area and > crop down to this size + border). > > This would be really interesting but then you would need to go through > all text and graphical operators on the page and call getBBox on them > and calculate the area from them. > That's what I was afraid of. How can I obtain a list all text and graphic objects on a given page? How do I call getBBox on them? Thanks again, - Eric ------------------------------------------------------------------------------ What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d _______________________________________________ Pdfedit-support mailing list Pdfedit-support@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdfedit-support