If you became a customer of the Syncfusion� Reporting Platform or the Report Viewer, Report Designer, or Report Writer components before October 2019 and have questions related to those products, you can request support through our forum system. However, please note that this support system is only for existing customers who are still using the Syncfusion� Reporting Platform or its components and not for new customers looking for reporting products from Syncfusion�.

For new customers or those with general reporting questions, we recommend contacting our support team at https://support.boldreports.com/, which is a separate brand created by Syncfusion� for its reporting solutions. Our team will be happy to assist you with any questions you may have.

Thank you for choosing Syncfusion� for your reporting needs.

Embedded TrueType font for PDF export in Core Web

Hi
I have this field with Arial font (i need to emulate checkbox):

=IIF(Fields!OnTerminal.Value="True",chr(9745),chr(9634))

And this is my code on server side:
public void OnReportLoaded(ReportViewerOptions reportOption)
{
reportOption.ReportModel.PDFOptions ??= new PDFOptions();

AddFonts(reportOption.ReportModel.PDFOptions);
}

private void AddFonts(PDFOptions pdfOpt)
{
AddFont(pdfOpt, "Wingdings");
AddFont(pdfOpt, "Arial");
}

public void AddFont(PDFOptions pdfOpt, string name)
{
var basePath = _hostingEnvironment.WebRootPath;

var path = Environment.OSVersion.Platform == PlatformID.Unix ||
Environment.OSVersion.Platform == PlatformID.MacOSX
? @"/" + basePath + @"/fonts/"
: basePath + @"\fonts\";

var file = path + name + @".ttf";

var inputStream = new FileStream(file, FileMode.Open, FileAccess.Read);

pdfOpt.Fonts ??= new Dictionary<string, Stream>(StringComparer.OrdinalIgnoreCase);

pdfOpt.Fonts.Add(name, inputStream);
}
based on documentation, 

https://www.syncfusion.com/kb/10753/how-to-pass-embedded-font-for-exporting-in-onreportloaded-method

but it doesn't work - in Report Viewer its is ok.
But when i export to PDF, there are empty fields, without nothing.

Can you help me?

9 Replies 1 reply marked as answer

MS Mahendran Shanmugam Syncfusion Team November 19, 2020 10:56 AM UTC

Hi Tomasz, 

We have checked the mentioned issue with using the external font but we were not able to reproduced could you please share your issue reproducible report file to validate the mentioned problem at our end. Also could you please share which version of Report Viewer assemblies and script are you using in your application.  

Regards,   
Mahendran S.  



TO Tomasz November 19, 2020 11:47 AM UTC

I attached report and screens from app. I develop App on macOS, but use report designer on Windows.

Attachment: Archive_d1182060.zip


TO Tomasz November 19, 2020 12:41 PM UTC

There are my scripts (i use current version):

<link rel="stylesheet" rel='nofollow' href="https://cdn.syncfusion.com/ej2/styles/compatibility/material.css"
asp-append-version="true"
asp-fallback-rel='nofollow' href="~/lib/syncfusion/material.css"/>

@* BoldReports Styles *@
<link rel='nofollow' href="https://cdn.boldreports.com/2.4.10/content/bold.widgets.core.compatibility.min.css"
asp-append-version="true"
asp-fallback-rel='nofollow' href="~/lib/syncfusion/bold.widgets.core.compatibility.min.css"
rel="stylesheet"
/>

<link rel='nofollow' href="https://cdn.boldreports.com/2.4.10/content/material/bold.theme.compatibility.min.css"
asp-append-version="true"
asp-fallback-rel='nofollow' href="~/lib/syncfusion/bold.theme.compatibility.min.css"
rel="stylesheet"/>









<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"
asp-append-version="true"
asp-fallback-test="$.easing"
asp-fallback-src="~/lib/syncfusion/jquery.easing.min.js"
type="text/javascript">
script>

<script src="https://cdn.syncfusion.com/js/assets/external/jsrender.min.js"
asp-append-version="true"
asp-fallback-test="jQuery && jQuery.views"
asp-fallback-src="~/lib/syncfusion/jsrender.min.js">
script>



<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"
asp-append-version="true"
asp-fallback-test="window.ejs"
asp-fallback-src="~/lib/syncfusion/ej2.min.js">
script>

@* BoldReports Scripts *@
<script src="https://cdn.boldreports.com/2.4.10/scripts/common/bold.reports.common.min.js"
asp-append-version="true"
asp-fallback-test="$.fn.addEleAttrs"
asp-fallback-src="~/lib/syncfusion/bold.reports.common.min.js">
script>

<script src="https://cdn.boldreports.com/2.4.10/scripts/common/bold.reports.widgets.min.js"
asp-append-version="true"
asp-fallback-test="ej.Tooltip && ej.Tooltip.CloseMode"
asp-fallback-src="~/lib/syncfusion/bold.reports.widgets.min.js">
script>



<script src="https://cdn.boldreports.com/2.4.10/scripts/data-visualization/ej.chart.min.js"
asp-fallback-test="ej.Ej3DRender"
asp-append-version="true"
asp-fallback-src="~/lib/syncfusion/ej.chart.min.js">
script>


<script src="https://cdn.boldreports.com/2.4.10/scripts/data-visualization/ej.map.min.js"
asp-fallback-test="ej.datavisualization.Map"
asp-append-version="true"
asp-fallback-src="~/lib/syncfusion/ej.map.min.js">
script>


<script src="https://cdn.boldreports.com/2.4.10/scripts/bold.report-viewer.min.js"
asp-fallback-test="ej.ReportViewer"
asp-append-version="true"
asp-fallback-src="~/lib/syncfusion/bold.report-viewer.min.js">


MS Mahendran Shanmugam Syncfusion Team November 23, 2020 11:43 AM UTC

Hi Tomasz, 

We were able to reproduce the mentioned issue at our end. We have forwarded the issue to development team for finding the root cause and we will update you the further details on 26th November 2020. 

Regards, 
Mahendran S.  



MS Mahendran Shanmugam Syncfusion Team November 27, 2020 01:37 PM UTC

Hi Tomasz,  

We are still checking on this causes in the asp.net core. We will update the status by 1st Dec 2020 with priority. However the winding font support we have limited support so is this possible to use the check box image instead of winding font ?  

Regards,  
Mahendran S.   



TO Tomasz November 27, 2020 02:05 PM UTC

Yes, i don't need wingdings font. I used it for emulate checkbox only.


MR Manoranjan Rajendran Syncfusion Team November 30, 2020 07:50 AM UTC

Hi Tomasz, 
 
If you do not want to add a checkbox using font then you can do it by using an image. Please refer the below documentation for add checkbox using image.
https://help.boldreports.com/standalone-report-designer/how-to/add-check-box-in-table-report-using-image-item/#how-to-add-checkbox-in-table-using-image
 
 
Regards, 
Manoranjan R 


Marked as answer

TO Tomasz November 30, 2020 10:45 AM UTC

Thank you, i think it will be ok for me.


MS Mahendran Shanmugam Syncfusion Team December 1, 2020 05:02 AM UTC

Hi Tomasz, 

Thanks for your update. 

Regards, 
Mahendran S. 


Loader.
Up arrow icon