Extracting a bitmap from existing PDF document.

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
ryanfure
Posts: 8
Joined: Thu Jan 06 2005
Location: Wisconsin

Extracting a bitmap from existing PDF document.

Post by ryanfure »

Hello,

I am evaluating the PDF Creator software and our users need the ability to extract a section of the PDF document and save it as a bitmap. The section would be selected by the user. Is there a way to accomplish this with this software? I am using c++ to create the application.
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

The PDF Creator has a method “DrawCurrentPage” which will draw the contents of document to a DC. You then extract the position of the image you need. I have included a code snippet which might assist you.

pdf->DrawCurrentPage( (long) hMemDC, 0 );
// reset previous scaling
SetViewportExtEx( dc, oldView.cx, oldView.cy, NULL );
SetWindowExtEx( dc, oldWindow.cx, oldWindow.cy, NULL );
SetMapMode( dc, oldMap );

Hope this helps.
Post Reply