PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Feb 27, 2021 12:02 am

All times are UTC

Forum rules

Please read this before posting on this forum: Forum Rules

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Oct 07, 2015 12:14 am 

Joined: Fri Mar 22, 2013 1:27 am
Posts: 4

I have a scenario where I am converting an EMF to PDF using PDFSharp and a clipping rectangle with zero with and height is not working.
A zero with or height clipping rectangle is used to hide the output from drawing commands.

The code at fault is the use of System.Drawing2D.GraphicsPath.AddRectangle at XGraphicsPath.AddRectangle(XRect).

replace the contents of this function with

this.gdipPath.AddLines( new PointF[] { rect.TopLeft.ToPointF(), rect.TopRight.ToPointF(), rect.BottomRight.ToPointF(), rect.BottomLeft.ToPointF() } );

Which successfully initialises the GraphicsPath with the zero with or height rectangle and allows clipping to be performed on this path.


Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 2 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