I have one image with width:1024px and height:100000px I want to export this image into pdf with full size, but the image is put only on first page,..
here is my code:
Document doc = new Document();
try
{
iTextSharp.text.pdf.PdfWriter.GetInstance(doc, new FileStream(generatedPdfSaveFilePath, FileMode.Create));
doc.Open();
Image jpg = Image.GetInstance(imagePath);
jpg.Border = Rectangle.BOX;
jpg.BorderWidth = 5f;
doc.Add(jpg);
doc.Add(new Paragraph("Original Width: " + jpg.Width.ToString()));
doc.Add(new Paragraph("Original Height " + jpg.Height.ToString()));
doc.Add(new Paragraph("Scaled Width: " + jpg.ScaledWidth.ToString()));
doc.Add(new Paragraph("Scaled Height " + jpg.ScaledHeight.ToString()));
float Resolution = jpg.Width / jpg.ScaledWidth * 72f;
doc.Add(new Paragraph("Resolution: " + Resolution));
}
catch (Exception ex)
{
//Log error;
}
finally
{
doc.Close();
}
How export big image with full size on multiple pages?