PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Jul 01, 2024 8:18 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: File size
PostPosted: Fri Mar 23, 2012 12:52 pm 
Offline

Joined: Fri Mar 23, 2012 12:43 pm
Posts: 1
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


Top
 Profile  
Reply with quote  
 Post subject: Re: File size
PostPosted: Sun Mar 25, 2012 6:52 am 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 343
ZakOyten wrote:
What can I change?
Use the RELEASE build of PDFsharp, not the DEBUG build.

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 35 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group