pdf下载优化
parent
41841a3bc9
commit
565a8c5422
|
|
@ -30,7 +30,7 @@ namespace PDFGenerateApi
|
|||
using (var stream = new MemoryStream())
|
||||
{
|
||||
// 创建 PDF Writer
|
||||
PdfWriter writer = new PdfWriter(stream);
|
||||
PdfWriter writer = new PdfWriter(stream, new WriterProperties().SetCompressionLevel(CompressionConstants.BEST_COMPRESSION));
|
||||
PdfDocument pdf = new PdfDocument(writer);
|
||||
// 设置页面大小为横向 A4
|
||||
PageSize pageSize = PageSize.A4.Rotate();
|
||||
|
|
|
|||
Loading…
Reference in New Issue