PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

File size
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1951
Page 1 of 1

Author:  ZakOyten [ Fri Mar 23, 2012 12:52 pm ]
Post subject:  File size

I have to add some lines on an existing PDF-document. The Original PDF has a size of 20 KB.

After adding the line the new Document has a size of 680 KB.
Why is the output-file so big?
What can I change?

The code is:

For j = 0 To InputDocument.PageCount - 1
intSeitenZaehler += 1
objPDFPage = New PdfSharp.Pdf.PdfPage
objPDFPage = InputDocument.Pages(j)

pen = New PdfSharp.Drawing.XPen(PdfSharp.Drawing.XColors.Black, 1.5)
pointSeitenZaehler = New PdfSharp.Drawing.XPoint((objPDFPage.Width.Point * 0.05), (objPDFPage.Width.Point * 0.95) * -1)
pointMitte = New PdfSharp.Drawing.XPoint(20, 60)

gfx = PdfSharp.Drawing.XGraphics.FromPdfPage(objPDFPage)

point1 = New PdfSharp.Drawing.XPoint(intLiniePosLinks + (0 * numLiniePosAbstand), intLiniePosOben)
point2 = New PdfSharp.Drawing.XPoint(intLiniePosLinks + (0 * numLiniePosAbstand), intLiniePosUnten)
gfx.DrawLine(pen, point1, point2)
Next
InputDocument.Save("Dateiname")



Thanks
Walter

Author:  () => true [ Sun Mar 25, 2012 6:52 am ]
Post subject:  Re: File size

ZakOyten wrote:
What can I change?
Use the RELEASE build of PDFsharp, not the DEBUG build.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/