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

Minimum height of Row [Migradoc]

I want to set the minimum height of row. however it seems there is limit i am using below code [http://forum.pdfsharp.de/viewtopic.php?f=2&t=2812 ] var spacerRow = t1.AddRow(); spacerRow.Height = "0.1mm"; var para2 = new…
Maqsood
  • 369
  • 4
  • 17
6
votes
4 answers

Is it possible to install fonts on an Azure App Service?

We are using MigraDoc/PDFsharp GDI+ which depends on having fonts installed to the system in order to render. We have tried embedding the fonts but the GDI+ version of MigraDoc does not seem to support this. When trying to move this component to an…
6
votes
1 answer

How can set the page size of MigraDoc?

Sorry for I am just beginner of PDFsharp. How can I set PageSize to a document? Let's say A4. How to set it? Here it is my code. Thanks. Document document = new Document(); // Add a section to the document Section section =…
Joe.wang
  • 11,537
  • 25
  • 103
  • 180
6
votes
1 answer

How to open an existing PDF file with Migradoc PDF library

I am trying to use the Migradoc library from PDFSharp (http://www.pdfsharp.net/) to print pdf files. So far I have found that Migradoc does support printing through its MigraDoc.Rendering.Printing.MigraDocPrintDocument class. However, I have not…
Brian
  • 2,702
  • 5
  • 37
  • 71
6
votes
1 answer

How can I determine if a MigraDoc table would be split among two pages?

I'm using MigraDoc to generate some PDFs. I have code to create a table of text for each element in an array and am printing out pages with these tables. However, the requirements I am being given is that if I have 2 tables, and the 2nd table would…
KallDrexx
  • 27,229
  • 33
  • 143
  • 254
5
votes
2 answers

MigraDoc and .NET Core 2.0

I have made a class library for PDF-generation. It is implemented using PDFshart-MigraDoc (the core package*). The class library itself is made with .NET Standard as its target framework. I can use the class library in classic C# projects (like…
Jakob Busk Sørensen
  • 5,599
  • 7
  • 44
  • 96
5
votes
1 answer

MigraDoc - Setting Cell Colour from Hex

Have a HEX colour code string in the database ("#ADD8E6") and I want to use this to change the background colour of a MigraDoc cell. I have found Color.Parse() function, however it isn't changing the colour of my cell. I have had to do the…
CJH
  • 1,266
  • 2
  • 27
  • 61
5
votes
1 answer

MigraDoc: How to apply vertical line spacing to a paragraph?

I am creating a PDF using MigraDoc. Everything works fine except the setting of line spacing of a paragraph. I want to have more vertical space between paragraph lines. What I tried so far without any change in the resulting PDF: string text =…
Thariama
  • 50,002
  • 13
  • 138
  • 166
5
votes
3 answers

Removing table cell padding in Migradoc PDF

I'm trying to remove some unwanted padding in a Migradoc-generated PDF; but so far no luck. I went to the Migradoc forum, but couldn't find any issues that were the same as mine (and I didn't want to register on yet another site to ask a single…
peter3
  • 1,074
  • 13
  • 22
5
votes
1 answer

PDFsharp / MigraDoc font resolver for embedded fonts: System.ArgumentException: Font 'Ubuntu' cannot be found

I am using MigraDoc to generate PDFs in my ASP.NET5 MVC6 Web Application, which is deployed to the Azure cloud. I am using version 1.50 beta-2, but I have also tried using v1.50 beta-1 and v1.32. I have had success generating PDFs when the app is…
08Dc91wk
  • 4,254
  • 8
  • 34
  • 67
5
votes
1 answer

Fit image onto one PDF page using MigraDoc

I am able to easily add an image to a section in the PDF file with MigraDoc. However, the image is cut in half by the page width. Is there a way to force the picture to resize so that it completely fits on one page? Or must this be done…
Chris
  • 28,822
  • 27
  • 83
  • 158
5
votes
1 answer

MigraDoc - Get Pages Number

How I can get the number of pages before rendering? I need to write the number as words in my document.
Blackbee
  • 51
  • 1
  • 2
5
votes
3 answers

How can I reduce the top margin of a MigraDoc document?

How can I reduce the top margin of a MigraDoc document? I added an image to the top right of my document however the space between the top of the document and the image is too big. Here is how I'm setting the image: Section section =…
user1526912
  • 15,818
  • 14
  • 57
  • 92
5
votes
1 answer

MigraDoc: How do I add preceding spaces to a String?

I have a table of text data and I'd like to indent certain pieces of data by a couple spaces, but everything I try seems to result in my string being automatically trimmed, and the preceding spaces are deleted. The PDF as it is right now looks…
mkautzm
  • 1,086
  • 2
  • 18
  • 34
4
votes
0 answers

How to fit a big legend under a chart?

I have a lot of elements in my graph, which don't fit into one line under the graph. How can I achieve a line break so that all legend's fit under the graph? Here is an example of my use case, copy it into a local project and use NuGet to config…
SiGa
  • 177
  • 1
  • 3
  • 12
1 2
3
25 26