UglyToad / PdfPig

Read and extract text and other content from PDFs in C# (port of PDFBox)
https://github.com/UglyToad/PdfPig/wiki
Apache License 2.0
1.73k stars 241 forks source link

Generated file size increased in spooler #304

Closed jay-r0m closed 1 year ago

jay-r0m commented 3 years ago

Hi there, i didn't find any references to this problem. I build 360ko pdf file but when send to printer, it's size increased to 120mo.

It's not a big deal for a few prints but i plan to chain hundreds of files and that can take too much time for all files to print.

I put an image into an A4 format.

Here's my code sample :

PdfDocumentBuilder pdfDocumentBuilder = new();

PdfPageBuilder pdfPageBuilder = pdfDocumentBuilder.AddPage(UglyToad.PdfPig.Content.PageSize.A4, true);
var image = pdfPageBuilder.AddJpeg(memoryStream.ToArray(), new UglyToad.PdfPig.Core.PdfRectangle(0, 0, 595, 842));

return pdfDocumentBuilder.Build();

Did anyone face that issue ?

EliotJones commented 1 year ago

hi there, unfortunately I'm not really sure I know anything about printing of PDF files