PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 8:51 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Drop shadows
PostPosted: Wed Jul 14, 2021 10:56 am 
Offline

Joined: Wed Jul 14, 2021 10:06 am
Posts: 1
Is there a way of adding a drop shadow to a polygon or other shape being added to a PDF file?

I found this thread but I'm not clear if they were trying to do the same thing.
viewtopic.php?f=2&t=626&hilit=drop+shadow

Essentially this is what I have at the moment being inserted into my document via another page created in PDFSharp:
Image

This is something that gets inserted potentially multiple times into the document but the background colour changes & sometimes the background colour can be quite light. This makes the super-imposed polygon virtually invisible in some cases. Ideally I'd like to add a small drop shadow to the cross polygon added to the PDF page but have no idea how to go about doing this or even if it's possible.


Top
 Profile  
Reply with quote  
 Post subject: Re: Drop shadows
PostPosted: Thu Jul 15, 2021 7:59 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 905
Location: CCAA
patrickps wrote:
Is there a way of adding a drop shadow to a polygon or other shape being added to a PDF file?
Should be easy: Draw the same polygon or shape with a small offset using a semi-transparent grey.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
 Post subject: Re: Drop shadows
PostPosted: Fri Mar 25, 2022 12:21 pm 
Offline

Joined: Fri Mar 25, 2022 11:57 am
Posts: 1
How would I soften the edge of the drop shadow shape?

The only way I can think to do it is to start with the original shape then copy and scale it by a pixel or 2 then increase the copies transparency by 10%. Then copy the copy and repeat 9 more times so I have 10 shapes with increasing scale and transparency. Is there an easier way?


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

All times are UTC


Who is online

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