Spire.PDF 6.12.3已发布。该版本支持了添加页面标签,并且支持转换PDF到PDFX1A文档。此外,该版本还修复了转换PDF到图片/TIFF时出现的问题。详情请阅读以下内容。
新功能:
- 支持了添加页面标签。
//当文档没有页面标签时
PdfDocument doc = new PdfDocument(inputFile);
doc.PageLabels = new PdfPageLabels();
doc.PageLabels.AddRange(0, PdfPageLabels.Decimal_Arabic_Numerals_Style, "label ");
doc.SaveToFile(outputPDF);
//当文档有页面标签时
PdfDocument doc = new PdfDocument(inputFile);
PdfPageLabels label = doc.PageLabels;
label.AddRange(2, PdfPageLabels.Decimal_Arabic_Numerals_Style, "new label ");
doc.SaveToFile(outputPDF);
PdfStandardsConverter converter = new PdfStandardsConverter("in.pdf");
converter.ToPdfX1A2001("out.pdf");
signature.ConfigureCustomGraphics(DrawGraphics);
private void DrawGraphics(PdfCanvas g)
{
g.DrawString("Signed by:Tom", new PdfFont(PdfFontFamily.Helvetica, 12f), PdfBrushes.Red, new Rectangle(0, 0, 120, 20));
string inputFile = "C:/image.png";
PdfImage img = PdfImage.FromFile(inputFile);
g.DrawImage(img, 0, 60, 150, 50);
}
问题修复:
- 修复了签名后的文档用福昕阅读器打开看不见签名的问题。
- 修复了获取图片时抛内存不足的异常问题。
- 修复了转换PDF到图片内容不正确的问题。
- 修复了转换PDF到TIFF,annotation丢失的问题。
- 修复了打印PDF文档图片丢失的问题。
- 修复了在PdfGridCell里同时添加上标和括号时内容重叠的问题。
获取Spire.PDF 6.12.3,请点击: