Skip to main content
daitranthanhoa
Inspiring
March 31, 2017
Question

How can save a PDEElement to a image?

  • March 31, 2017
  • 4 replies
  • 1028 views

I had get a Object on PDF,

PDEContent pdeContent = PDPageAcquirePDEContent(pdPage, gExtensionID);

PDEElement  pdeElement = PDEContentGetElem(pdeContent, 0);

Now, i want save this object to a image.

How can save a PDEElement to a image?

Thanks all!.

This topic has been closed for replies.

4 replies

Legend
April 3, 2017

The same document you should already be using, plugin API.

lrosenth
Adobe Employee
Adobe Employee
March 31, 2017

Do you mean like rasterizing text or vectors to a raster image?

daitranthanhoa
Inspiring
April 1, 2017

My Plugin extract image of file PDF the same this menu:Tools > Document Processing > Export All Images.

lrosenth
Adobe Employee
Adobe Employee
April 1, 2017

OK, but that feature doesn't use PDE APIs to do the job.

But if you are doing that, then you can use simply coerce a PDEElement of type pdeImage to a PDEImage and use the appropriate APIs

Legend
March 31, 2017

The Acrobat SDK gives information on the PDEImage methods. You need to know how to recursively iterate the page descending into PDEContainers.

The SDK includes the PDF specification. Be sure you are familiar with the chapter "Graphics" as you must understand the graphics model, colour spaces etc. to use this API.

If you do not know about the different representations of image file formats (e.g. bits per compontent, pixel ordering, row and sample padding, compression, colour spaces, indexes etc.) you will need to some general study first.

Legend
March 31, 2017

Is your PDEElement a PDEImage? If so you can read the colour space, bits per component; read the pixels; convert to the representation needed by the image file format; write the image.

daitranthanhoa
Inspiring
March 31, 2017

Can you give me a sample or document?

thanks.