Wrong line spacing in PDF with embedded fonts

Stimulsoft Reports.NET discussion
Post Reply
Tobias
Posts: 110
Joined: Mon Nov 24, 2008 8:44 am

Wrong line spacing in PDF with embedded fonts

Post by Tobias »

Hi! This is driving me nuts. When exporting as PDF. the line spacing is wrong as soon as I export with the fonts embedded.
The weird thing: this only happens in my production app. I can not reproduce this in a standolen app. Although, I use the exact same code:

Code: Select all

var stiReport = new StiReport();
stiReport.Load("pdf-export-test.mrt");
stiReport.Render();
stiReport.ExportDocument(StiExportFormat.Pdf, "fonts-embedded.pdf",
    new StiPdfExportSettings { EmbeddedFonts = true });
stiReport.ExportDocument(StiExportFormat.Pdf, "fonts-not-embedded.pdf",
    new StiPdfExportSettings { EmbeddedFonts = false });
Any ideas?
Attachments
pdf-export-test.mrt
(3.25 KiB) Downloaded 553 times
fonts-not-embedded.pdf
(7.95 KiB) Downloaded 47 times
fonts-embedded.pdf
(47.14 KiB) Downloaded 56 times
Lech Kulikowski
Posts: 7763
Joined: Tue Mar 20, 2018 5:34 am

Re: Wrong line spacing in PDF with embedded fonts

Post by Lech Kulikowski »

Hello,

On the computer where the production app is running, is the system scaling set to 125%?

Is this production app marked as HiDpiAware or not?
Because it looks like our library cannot correctly detect the system scaling. This can happen if the application is not set as DpiAware, or if it is running as a service without user permissions, or in similar cases.

Thank you.
Tobias
Posts: 110
Joined: Mon Nov 24, 2008 8:44 am

Re: Wrong line spacing in PDF with embedded fonts

Post by Tobias »

Thanks! This is indeed the case. It's a WPF .Net8 App. When I reduce scaling to 100% OR add a manifest with:

Code: Select all

<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
...then it works fine.

The thing is - PDF creation should not depend on the user DPI scaling preferences at all. And I consider this a regression bug, as it worked perfectly fine in
2025.4.3. Version 2026.1.1 seems to be the first version to introduce this strang issue.
Attachments
fonts-embedded-2025.4.3.pdf
(47.06 KiB) Downloaded 55 times
fonts-embedded-2026.1.1.pdf
(47.13 KiB) Downloaded 50 times
Lech Kulikowski
Posts: 7763
Joined: Tue Mar 20, 2018 5:34 am

Re: Wrong line spacing in PDF with embedded fonts

Post by Lech Kulikowski »

Hello,

We require more time to investigate the issue thoroughly. Rest assured, we will keep you informed about the outcome as soon as possible.

Thank you.
#19765
Lech Kulikowski
Posts: 7763
Joined: Tue Mar 20, 2018 5:34 am

Re: Wrong line spacing in PDF with embedded fonts

Post by Lech Kulikowski »

Hello,

This issue did not reproduce in our tests even once.
However, we have added additional checks and a fix.

Thank you.
Anthona
Posts: 4
Joined: Fri Jun 20, 2025 4:16 am

Re: Wrong line spacing in PDF with embedded fonts

Post by Anthona »

Tobias wrote: Fri Mar 20, 2026 7:10 am Hi! This is driving me nuts. When exporting as PDF. the line spacing is wrong as soon as I export with the fonts embedded.
The weird thing: this only happens in my production app. I can not reproduce this in a standolen app. Although, I use the exact same code:

Code: Select all

var stiReport = new StiReport();
stiReport.Load("pdf-export-test.mrt");
stiReport.Render();
stiReport.ExportDocument(StiExportFormat.Pdf, "fonts-embedded.pdf",
    new StiPdfExportSettings { EmbeddedFonts = true });
stiReport.ExportDocument(StiExportFormat.Pdf, "fonts-not-embedded.pdf",
    new StiPdfExportSettings { EmbeddedFonts = false });
drive mad
Any ideas?
In addition to the system scaling and HiDpiAware settings, I would like to inquire whether there could be any discrepancies in the font versions being used in the production application compared to the standalone app. Could this potentially lead to differences in the PDF export with embedded fonts?
Post Reply