Welcome
Guest
•
Login
PDFsharp and MigraDoc Wiki
Navigation
¶
Main Page
Random Page
Create a new Page
All Pages
Categories
Navigation Paths
File Management
Create Account
Quick Search
»
Visit the new
Website for PDFsharp & MigraDoc Foundation 6.0 for .NET 6
and find information about the new version for Windows, Linux, and other platforms.
Back
MigraDoc: Spaces in MigraDoc Documents
Modified on 2017/06/22 10:22
by
Thomas Hövel
Categorized as
Articles
,
MigraDoc Articles
,
MigraDoc FAQ
A space is a space is a space.{br} But not all spaces are equal. And they do not always behave as you expect. ==Spaces in MigraDoc== MigraDoc documents can persist in text files ([MigraDocDDL|MigraDoc DDL (MDDDL) format]). To make these files readable for humans, the files can contain line breaks and indentation. When MigraDoc renders a document, multiple spaces (ASCII code 32, accessible through the space bar on your computer) will be treated as one because the spaces could just be the result of indentation in an MDDDL file. This is very similar to HTML where indentation can also be used to make a nice source file, but extra space is ignored by the browser during rendering. ==How can I get extra spacing?== There are different ways that may or may not work, depending on what you try to achieve. Often you can get what you want by using indentation and tab stops. ===No-Break Spaces=== Multiple no-break spaces will never be collapsed to a single space, so you can use that to get extra spacing. But there is a drawback: No-break spaces (NBSP) will not get broken, as the name implies. If you place three NBSP between two words, the layout routine will treat this as one long word, so both words will always be on the same line. The NBSP is U+00A0 in Unicode. Windows users can enter NBSP using <Alt+255> or <Alt+0160>. To get those characters, hold down the Alt key while typing the digits on the numeric keypad. ===Indentation=== A common task: you want to create a bullet list and want to have extra space before and after the bullet. The right way to achieve this: use left indentation for the body text, use a negative indentation for the first line to position the bullet, set a tab stop in line with the left indentation and add a tab after the bullet.
Meta Keywords:
Meta Description:
Change Comment:
Visit the new
Website for PDFsharp & MigraDoc Foundation 6.0 for .NET 6
and find information about the new version for Windows, Linux, and other platforms.
Miscellaneous
Home
PDFsharp
FAQ
Samples
Articles
MigraDoc
FAQ
Samples
Articles
ScrewTurn Wiki version 3.0.5.600. Some of the icons created by
FamFamFam
.
Impressum - Privacy Policy, Data Protection Declaration, Legal Notice