Hi all,

I am currently evaluating iTextSharp 5.1.1.

I try to extract images from PDF built by a scanner with an IRenderListener as 
explained in this iText book. The scanner is always the same. It usually works 
fine but extracted images are sometimes upside-down although the source PDF is 
viewed correctly with all my PDF tools. Do i have missed a parameter or is it a 
bug ? Is it another way to do the same job ?

Here is a PDF source sample, which fails with iTextSharp:
http://www.numelex.be/alexis/upsidedown.pdf

The output image:
http://www.numelex.be/alexis/upsidedown.png

And the snippet of code:
public void RenderImage(ImageRenderInfo renderInfo)
{
   PdfImageObject pdfImage = renderInfo.GetImage();
   Bitmap bmp = (Bitmap)pdfImage.GetDrawingImage();
   bmp.Save(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + 
"\\upsidedown.png", ImageFormat.Png);
}

Thank you in advance for your help,
Alexis

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to