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
4
votes
1 answer

MigraDoc section width

I wanted a method to set relative column width in MigraDoc, and I found this post on the subject. The problem is, it does not work for me. I have copied the exact code from that post: Section section =…
Jakob Busk Sørensen
  • 5,599
  • 7
  • 44
  • 96
4
votes
1 answer

Add superscript and subscript for pdf via migradoc

I am looking at a function that someone has written. The goal of the function to read html tags and format html tags appropriately for a pdf via MigraDoc. This is the definition of the function. private Boolean RecursiveFormattedParagraph(Document…
user2771150
  • 722
  • 4
  • 10
  • 33
4
votes
1 answer

Migradoc real table cell padding

Is there a way to add real padding to migradoc table cells? The options that they currently have (LeftPadding and RightPadding) actually work like margins and not like padding. And if you use it, it pushes the background color as well instead of…
tkit
  • 8,082
  • 6
  • 40
  • 71
4
votes
1 answer

PDFsharp generates blank page in Azure, but works locally

This works in an ASP.NET MVC application when run locally, but not when deployed on Azure: Document doc = new Document(); Section section = doc.AddSection(); section.AddParagraph("Some text to go into a PDF"); PdfDocumentRenderer…
Robert M.
  • 575
  • 5
  • 17
4
votes
1 answer

Image not found while generating PDF

I am trying to place image in PDF using XSLT. I have images that are already displayed but in that case I have the bytecode initially and I simply generate the base64 string. However in the below case I am reading image from the resource file and…
Maqsood
  • 369
  • 4
  • 17
4
votes
0 answers

How do I sign a pdf with electronic signature in PDFSharp?

Is it possible to sign a pdf document with electronic signature in PDFSharp? How to do it? Thanks for your suggestions.
m_david
  • 3,207
  • 1
  • 17
  • 16
4
votes
1 answer

Adding backround color to certain part of text with MIGRADOC AND PDFSHARP

I'm struggling to add background color on certain part of sentence(text), word with MIGRADOC and PDFSHARP. Any suggestions how to do ? par.addText(coloredText); This is how I tried to add text that should be colored but there is no way to setup for…
misha
  • 231
  • 1
  • 2
  • 5
4
votes
2 answers

MigraDoc Two Tables in one row

I am working on creating a report with MigraDoc that would be able to have 4 tables, 2 rows with 2 tables. I have tried a number of different methods to accomplish this. 1- I have tried creating a leftIndent on the table. table1.Format.LeftIndent…
coding
  • 71
  • 2
  • 10
4
votes
1 answer

Does MigraDoc support national characters/ unicode characters?

I’m using MigraDoc for generating PDF documents. It works very well but I have 2 problems: I cannot add Polish characters (especially ł) to text like. I cannot add pound character (₤) to text. I tried to change font, but no result.
P.K.
  • 1,746
  • 6
  • 25
  • 62
4
votes
1 answer

Table of Content printing correctly for PDF but not for RTF

I am working on a project where I need to create a PDF file and a RTF file, with a Table Of Content. I am doing this using MigraDoc + PdfSharp library for C#. The code for Table of content for both the files is : public static void…
Aamir Jamal
  • 855
  • 9
  • 15
4
votes
3 answers

How to Define a PDF Outline Using MigraDoc

I noticed when using MigraDoc that if I add a paragraph with any of the heading styles (e.g., "Heading1"), an entry is automatically placed in the document outline. My question is, how can I add entries in the document outline without showing the…
Jeff G
  • 4,470
  • 2
  • 41
  • 76
4
votes
2 answers

Release lock on image file after using section.AddImage() in MigraDoc-WPF

I have the following code to generate a report PDF, upload it and then delete the temporary image used in the generation: // Generate document and then add a section with an image var document = new Document {Info = {Title = "Results"}}; var section…
Alasdair Stark
  • 1,227
  • 11
  • 32
4
votes
1 answer

What are the best ways to deal with these PDFSharp table limitations?

I am using PDFSharp to export a table to PDF (using the regular MigraDoc.DocumentObjectModel.Tables.Table object). It works great except I ran into a few issues: if the content of a single cell in the table is longer than the height of the page it…
leora
  • 188,729
  • 360
  • 878
  • 1,366
3
votes
1 answer

MigraDoc - Get height of section

What I'm trying to achieve is to have the same content twice on the page, separated by a dotted line, with padding so that the one copy is on the top-half and the second is on the bottom half. Something like firstSection.SpaceAfter = (height of page…
Strikegently
  • 2,251
  • 20
  • 23
3
votes
1 answer

MigraDoc - Table Border but no Cell/Row/Column Borders

I am struggling to implement what seems should be something straight forward, but having not much luck. I need a MigraDoc table to render with just the Table border, excluding all cells in between: I have followed the remarks on this post: How do…
CJH
  • 1,266
  • 2
  • 27
  • 61