PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri May 27, 2022 12:42 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: Mon Nov 04, 2019 11:06 am 

Joined: Mon Nov 04, 2019 10:59 am
Posts: 1
Hoping for some help as I'm fairly new to MigraDoc and PDF Sharp.

I have a table which is displaying a calendar so each cell in the table has text which is the day of the month. Some cells need to have an image added to them to show an event is taking place for that date. I have seen a few articles which seem to suggest a number of different methods including text frames but so far I have been unable to get any to actually display what I want - for example a red circle with a number in it which seems simple enough. I have previously got water marks to work so I thought I would check out that approach. My code is

paragraph = row.Cells(0).AddParagraph()
formattedText = paragraph.AddFormattedText(CStr(Day(caldate)).PadLeft(2, "0"), TextFormat.NotBold)

' Yes there is an event for this day
Dim imagefile As String = HttpContext.Current.Server.MapPath("./images/event.png")
Dim myImage As Shapes.Image = paragraph.AddImage(imagefile)
myImage.Top = Shapes.ShapePosition.Top
myImage.WrapFormat.Style = Shapes.WrapStyle.Through
myImage.LockAspectRatio = True

However this shows the text above the image - I have tried various extra flags for alignment etc but none give the required effect of placing the text on top of theimage. Any suggestions please?

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: Bing [Bot], Google [Bot] and 17 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