我正在使用 iTextSharp DLLin asp.net。
PdfReader reader = new PdfReader(path);
//create footer
MemoryStream outStream = new MemoryStream();
PdfStamper textStamp = new PdfStamper(reader, outStream);
BaseFont baseFont = BaseFont.CreateFont(BaseFont.HELVETICA_BOLD, Encoding.ASCII.EncodingName, false);
for (int i = 1; i <= reader.NumberOfPages; i++)
{
PdfContentByte pdfPageContents = textStamp.GetOverContent(i);
//How to convert the PdfContentByte to array of bytes here?
}
我想将 PDF 的每一页转换为 JPEG。如何在此处将 PdfContentByte 转换为字节数组?