RDLC to PDF changes font from black to RGB

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v7)  /  RDLC to PDF changes font from black to RGB

DynamicPDF CoreSuite for .NET (v7) Forum

Hello,

We are having problems printing reports that are generated via RDLC to PDF. In the process of converting from RDLC to PDF using DynamicPdf, the font is being changed from black to RGB. We need to somehow persist the black font from the RDLC or embed black font into the newly generated PDF. Wondering if anyone can help with this issue.

Thanks!
I think what we basically need is a way to embed one font for the entire document and to prevent any other fonts from being used on the document. We don't have access to any field IDs/Names so we can't apply a certain font to individual fields. Is it possible to apply a certain font to the entire document dynamically/programmatically?

Thanks!
Dave
Posted by a ceTe Software moderator
Hi Dave,

There isn't a direct way to embed a font into a PDF, but you can add custom fonts to a PDF through page elements used for adding contents. You will need to create an OpenTypeFont object and set to the page element through which you are adding contents to the PDF.  Please refer to the documentation on fonts and text here.

Thanks,
ceTe Software Support Team
Posted by a ceTe Software moderator
Hi,

When merging a PDF, our API is designed to not make changes like this.

Please send over following information to support@dynamicpdf.com  so we can look into it further.

1.Simple console application which uses static data to recreate the behavior.
2.Soruce PDFs used for merging.
3.Output PDF.
4.Exact version and build number of the DynamicPDF  product used in your application. You can find this information by right clicking on the DLL file>>Properties>>Details tab>.Product version. Take screenshot of Details tab and send it over to us.
5.More details on the issue you are facing by referencing to the output PDF.

Thanks,
ceTe Software Support Team
Hi

I appreciate the assistance.

Here are the specs for the DynamicPDF library we're using:
Product Name: DynamicPDF for .NET
Product Version: 7.0.2.40

I'm curious how the library chooses the fonts to use on the PDF when converting an RDLC file (or any other file) to PDF. We basically just take the rendered RDLC report and do a dynamic conversion to PDF, like so: var pdf = new PdfDocument(RDLC report);. Is it safe to say that if we want to control the font used on the PDF (all black & white) that we might have to rethink our PDF creation process?

Thanks,
David

Posted by a ceTe Software moderator
Hi David,

When using an RDLC file, you will actually be using the PDF created from it with our product, not the RDLC file itself. Our product leaves the fonts and colors alone, so however they are in your output PDF (from the RDLC file) is how they will be after the merge.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 9:53 PM.