Ask a Question related to Adobe Acrobat SDK, Design and Development.
-
Steve_J_Willis@adobeforums.com #1
Convert page size to pixels
Two (possibly) related questions:
(1) I am drawing the image of a page to an offscreen bitmap using PDPageDrawContentsToWindow. I need to allocate a correct height and width for the page in pixels for the resulting bitmap. What I want is an image that represents the size of the page at 100% zoom. This is what I've tried:
ASFixedRect cropBox;
PDPageGetCropBox(AVPageViewGetPage(pageView), &cropBox);
AVDevRect pageRect;
AVPageViewRectToDevice(pageView, &cropBox, &pageRect);
double zoom = ASFixedToFloat(AVPageViewGetZoom(pageView));
int pageWidth = (int) (abs(pageRect.right - pageRect.left) / zoom);
int pageHeight = (int) (abs(pageRect.bottom - pageRect.top) / zoom);
The above width and height are too large for the image drawn to my bitmap by PDPageDrawContentsToWindow.
(2) I notice that when I select File | Export | Image in Acrobat and save the page as a JPEG, the resulting image width and height are substantially larger than the width and height calculated in #1 (which are themselves too large for the PDPageDrawContentsToWindow function). How does Acrobat choose an optimal width/height to avoid aliasing? The size of my output image is arbitrary; I want to choose a width and height that are optimal to capture the image data of the original page, and understand how to scale the output of PDPageDrawContentsToWindow to those values.
Thanks!
Steve
Steve_J_Willis@adobeforums.com Guest
-
Document Size = Picture Size (in pixels)
I've been doing a lot of picture annotations for this muscle physiology lab I'm doing work for. Basically I take a picture of some muscle, place it... -
web page size in pixels
When creating a flash to be used as a web page. What is the general size that works best. Thank you in advance for you help with this. -
The size in pixels of text
Hi, I have a text member that it's text is changed on time to time, and I need to know the size in pixels of the current text at a time I'm... -
CAN I CHANGE SIZE (PIXELS) OF A PROJECTOR TO REDUCE THE FILE SIZE?
as far as I know you would have to transform bitmap scale all bitmap members to the new size, then readjust their positions to score, and adjust... -
convert pixels to centimeters
Hi, I have a printed format and need to translate it to the screen (web page); so when the visitors print it from the web they get the same printed... -
Leonard_Rosenthol@adobeforums.com #2
Re: Convert page size to pixels
You don't need to deal with the AV stuff here - just the page size...
BUT you need to remember to multiply by the resolution...
Leonard
Leonard_Rosenthol@adobeforums.com Guest
-
Steve_J_Willis@adobeforums.com #3
Re: Convert page size to pixels
Could you give me a more concrete example? I don't understand how to get the page size without dealing with the AV stuff.
My question is probably simpler than I stated above: PDPageDrawContentsToWindow will draw the page to a bitmap of some size, measured in pixels. I need to know what that size is in advance so I can create a correctly sized bitmap for it to draw on to hold the entire page. How do I determine the width and height of the page image PDPageDrawContentsToWindow will draw in pixels?
Your help is appreciated!
Steve
Steve_J_Willis@adobeforums.com Guest



Reply With Quote

