iTextSharpに問題があります。私は20000x1000の画像を持っており、ページサイズA1の水平のPDFにする必要があります。面倒なことは、画像の高さをPDFに合わせて調整し、画像に関連して複数のページを印刷する必要があることです。iTextSharp超広角画像を水平方向に複数ページで表示
私はこれを試しましたが、PDFを1ページで生成し、画像の幅と高さを調整しました。
Rectangle pageSize = PageSize.A1;
Document doc = new Document(pageSize.Rotate(), 10f, 10f, 10f, 10f);
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(@"C:\TestFiles\Default.pdf", FileMode.Create));
doc.Open();
Image image = Image.GetInstance(@"C:\TestFiles\image.png");
PdfPTable table = new PdfPTable(1);
table.WidthPercentage = 100;
PdfPCell c = new PdfPCell(image, true);
c.Border = PdfPCell.NO_BORDER;
c.Padding = 5;
c.Image.ScaleAbsoluteHeight(pageSize.Height);
table.AddCell(c);
doc.Add(table);
doc.Close();
ありがとうございます。