Questions tagged [migradoc]

MigraDoc Foundation is an open source .NET library that easily creates documents based on an object model with paragraphs, tables, styles, etc. and renders them into PDF or RTF. Use this tag for questions related to MigraDoc using any platform and any programming language.

MigraDoc Foundation is an open source .NET library that easily creates documents based on an object model with paragraphs, tables, styles, etc. and renders them into PDF or RTF.

MigraDoc Resources

Questions

Use this tag for all questions that relate to using the MigraDoc library.

PDFsharp is a different library from the same authors. MigraDoc includes PDFsharp and uses PDFsharp to create PDF files. Not all questions about MigraDoc justify the PDFsharp tag.
It is less confusing for people trying to answer your questions when you use the tag that corresponds to the API you are using (either or ). Simply look at the namespace of the objects you are using.

Related Tags

, ,

387 questions
0
votes
1 answer

Adding a footer with PDFsharp when concatenating pages

I merge PDF documents as shown here: Concatenate Documents (PDFsharp) This example uses PDFsharp to merge the documents. I want to add a footer to each page. I can do this with XGraphics.FromPdfPage(), but it looks extremely complicated as the…
Archeg
  • 8,364
  • 7
  • 43
  • 90
0
votes
1 answer

How do I make an image "float" on the left side in Migradoc?

In HTML, I can do something like this to make an image float and have the text wrap around it: Which looks something like this: Can I do something similar in Migradoc? I tried looking at WrapFormat, but…
Codecat
  • 2,213
  • 3
  • 28
  • 39
0
votes
1 answer

Remove Extra Space After Image in MigraDoc

Using MigraDoc, if I insert a new paragraph that only contains an image, there is extra space added after the image within the paragraph. Here is an example that demonstrates the issue: var document = new Document(); var section =…
Jeff G
  • 4,470
  • 2
  • 41
  • 76
0
votes
1 answer

How to set document level properties in MigraDoc?

I wanted to find a way to set the document level properties in MigraDoc. For example I want to set all margins (top, left, right, bottom) to 5 or want to set the font for whole PDF document once. I don't want to set them in each section or…
ahsant
  • 1,003
  • 4
  • 17
  • 25
0
votes
1 answer

MigraDoc image in cell overflow

I have 2 images in 2 cells (1 each so they are side by side). The image does not seem to set the height of the cell so the image rolls off the current page. Is there a way get the image to roll over to the next page if it needs it? I have tried to…
Ruddy
  • 9,795
  • 5
  • 45
  • 66
0
votes
1 answer

How can I align a paragraph at the top of a pdf page in MigraDoc?

Currently in my pdf page I have an image logo on the right hand side and a title on the left hand side. I want the title in the left hand side to be top aligned. Or atleast both the icon and the paragraph on the same line. How can I do this? I am…
Kalpa-W
  • 348
  • 3
  • 22
0
votes
1 answer

PDFsharp MigraDoc Mix: add annotations

Two remarks: MigraDoc Viewer is a great tool to render a generated PDF PDFsharp allows you to insert annotations (Text, etc.) into your PDF. I would like to see annotations on the Viewer, but need help to get started: Are annotations part of the…
peter.cyc
  • 1,763
  • 1
  • 12
  • 19
0
votes
3 answers

MigraDoc doesn't identify some installed TTF fonts

I am using MigraDoc to create a PDF using the provided data to my method in C#. The PDF is getting generated just fine for most fonts but I have installed a new font on the system called "Dancing Script". This font is available on the system and I…
F Nadeem
  • 93
  • 9
0
votes
2 answers

Unable to generate the rupee symbol (₹) using MigraDoc for C#

In the code snippet below, i am trying to embed the rupee symbol in the generated pdf document, but the pdf is rendering it as a square box instead of the symbol. Using MigraDoc, i have set the unicode property to 'true' and fontembedding to…
skywalker2909
  • 1,636
  • 2
  • 31
  • 46
0
votes
0 answers

PDF file downloaded open in Acrobat Reader

I'm downloading a PDF file using migradoc in my asp.net application : HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ClearContent(); HttpContext.Current.Response.ClearHeaders(); …
Ecnerwal
  • 362
  • 1
  • 2
  • 15
0
votes
1 answer

Bullet list types in Migradoc

How can i give user defined ListType using Migradoc. I have found 6 types of Listtypes. In those Bulletlist3 is the square but i need to give bigger size square so, how can i give that?
kva
  • 1
0
votes
3 answers

MigraDoc - only Last Page Footer

I have this code: Document document = new Document(); Section sec = document.AddSection(); Paragraph par; for (int i = 0; i < 50; i++) { par = sec.AddParagraph(); par.AddText("Wiki…
0
votes
2 answers

Migradoc & nested paragraphs

I am using Ben Foster's Migradoc extensions to format a PDF document using Markdown syntax. I am running into an issue when using headers or sub-lists ( or
  • elements) within a list (a null reference exception is thrown). The issue is…
  • CShark
    • 2,183
    • 1
    • 24
    • 42
    0
    votes
    2 answers

    Adding image to rtf doc being resized

    We're using migradoc api to create an rtf document.. intermittently when we add an image it;s being resized and coming out absolutely tiny. Code sample as follows: MigraDoc.DocumentObjectModel.Shapes.Image image =…
    Tom Miller
    • 431
    • 1
    • 5
    • 16
    0
    votes
    1 answer

    MigraDoc page break in middle of Text added by AddFOrmattedText

    Im creating a PDF-Document with MigraDoc. I added a full size "Header" to all Pages: Image bg = section.Headers.FirstPage.AddImage(@"\\server\header.bmp"); bg.Height = "29.7cm"; bg.Width = "21cm"; …
    Daniel M
    • 177
    • 1
    • 1
    • 13