PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Jun 14, 2021 11:06 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
PostPosted: Sun Nov 25, 2018 11:53 am 

Joined: Sun Nov 25, 2018 11:42 am
Posts: 1

I'm trying to add images to a MigraDoc paragraph in loop, but only the first image is displayed multiple times.

foreach (byte[] image in images)
                Paragraph scribble = section.AddParagraph();
                scribble.Format.Alignment = ParagraphAlignment.Center;
                scribble.Format.SpaceAfter = 15;
                ImageSource.ImageSourceImpl = new ImageSharpImageSource();
                var imgSource = ImageSource.FromBinary("Scribble", () => image);
                var i = scribble.AddImage(imgSource);
                i.Height = Unit.FromMillimeter(26.4 * 3);
                i.Width = Unit.FromMillimeter(60.8 * 3);

Can anyone tell me where I'm going

Reply with quote  
PostPosted: Sun Nov 25, 2018 1:08 pm 
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 642
Location: CCAA
I cannot help with inofficial ports of the library.
Check their documentation. Maybe user their source code for debugging.

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

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: No registered users and 14 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