question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

letter spacing in css is not working

See original GitHub issue

I have used DinkToPdf to create some PDF reports on my .net core web api. I included UserStyleSheet in ObjectSettings, but letter spacing is not working for some reason, so I’m realy eager to know if I’m doing something wrong or if letter spacing is not supported by the library. Enjoyed using library very much btw.

Here is the css code

h1 {
    text-align: center;
    font-weight: 700;
    font-size: 36px;
    margin-top: 30px;
    letter-spacing: 10px;
}

td, th {
    letter-spacing: 10px;
    height: 35px;
    border-bottom: 1px solid #dedede;
}

and here are the object settings:

  var objectSettings = new ObjectSettings
            {
                PagesCount = true,
                HtmlContent = UnitOfWork.Ucenici.htmlListaRangiranih(muski,zenski),
                
                WebSettings = { DefaultEncoding = "utf-8" ,UserStyleSheet = Path.Combine( _hostingEnvironment.WebRootPath,"PDFStyles","PDFstyle.css")},
                HeaderSettings = { FontName = "Arial", FontSize = 9 },
                FooterSettings = { FontName = "Arial", FontSize = 9 }
            };

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
aleksa-kuzmancommented, Nov 22, 2019

Thank you

1reaction
zadeabhicommented, Nov 20, 2019

There is an option smart shrink

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does letter spacing not always work with all letters?
Turn off ligatures in your CSS. ff and ffi in a font with ligatures enabled are single letters, and letter spacing will operate...
Read more >
letter-spacing - CSS: Cascading Style Sheets - MDN Web Docs
The letter-spacing CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing ...
Read more >
Topic: Letter spacing code not working
I found this code in a past thread to decrease letter spacing in headers, but it doesn't work for me. I even set...
Read more >
letter-spacing
The letter-spacing property controls the amount of space between each letter in a given element or block of text.
Read more >
Letter spacing issue in Chrome
One hack-ish way to fix it until the chrome bug is fixed is to simply put a negative margin on each of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found