Unplanned
Last Updated: 06 Oct 2025 11:03 by ADMIN
Sandy
Created on: 14 Feb 2025 13:05
Category: PdfProcessing
Type: Bug Report
4
PdfProcessing: NetStandard: Corrupted document when exporting "Courier New" subset

Corrupted document when exporting "Courier New" subset.

Workaround - fully embed the font:

var pdfFormatProvider = new PdfFormatProvider();
pdfFormatProvider.ExportSettings.FontEmbeddingType = FontEmbeddingType.Full;

 

8 comments
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 06 Oct 2025 11:03

Hello, David,

Currently, this task is not on our roadmap and there is no estimate or deadline for its completion. I also wouldn't want to mislead you by giving incorrect information just for the sake of it. Once any item is resolved, we update its public feedback page to notify our clients, so I encourage you to subscribe to the task if you haven't already to stay informed. 

I sincerely apologize for any frustration and setbacks this situation has caused you and your team. We understand how critical this functionality can be, and we appreciate your patience as we navigate the prioritization of our development efforts. 

At this time, there are no further workarounds or product settings that would resolve this issue without modifying the documents. If your workflow requires handling these fonts without manual intervention, I recommend considering alternative approaches or waiting for future updates.

Let me know if you need more details about the current limitations or if you would like advice on possible strategies given the product’s current capabilities.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Your perspective matters! Join other professionals in the State of Designer-Developer Collaboration 2025: Workflows, Trends and AI survey to share how AI and new workflows are impacting collaboration, and be among the first to see the key findings.
Start the 2025 Survey
David
Posted on: 03 Oct 2025 08:29

We'd really rather not update all the pdfs that are uploaded to our system.

Can I just confirm then that this isn't on the road map to be fixed and then we can make a decision on our side for next steps?

We're actually getting the same issue with CourierStd-Bold it looks like.

Thanks again.

Dave

ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 03 Oct 2025 08:20

Hello, David,

A possible approach I can suggest is after importing the PDF document, iterate all TextFragments or Widgets and replace the  "Courier New" font with another one (e.g. "Courier"). Thus, you will be able to preserve the content and still use the font subset export setting.

This is a sample code snippet for iterating the fields/widgets and applying a font:

		private void ApplyCourierFontManually(RadFixedDocument document)
		{
			foreach (var field in document.AcroForm.FormFields)
			{
				if (field is TextField textField)
				{			foreach (var widget in textField.Widgets)
							{
								var props = widget.TextProperties;
								if (props != null)
								{
									widget.TextProperties.Font = FontsRepository.Courier; 
                                                                }
							}
				}
			}
		}

Feel free to use this approach as a temporary solution which suits your scenario best.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Your perspective matters! Join other professionals in the State of Designer-Developer Collaboration 2025: Workflows, Trends and AI survey to share how AI and new workflows are impacting collaboration, and be among the first to see the key findings.
Start the 2025 Survey
David
Posted on: 01 Oct 2025 10:42
Hi, thanks again for coming back to me. These unfortunately aren't documents that we are generating, so we have no control over the font that is in use in the document. We are opening them, removing the javascript, and then saving them as is. After which we are no longer able to see the fields that contain Courier New as a font.
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 01 Oct 2025 10:40

Hello, David,

Embedding the full font is expected to increase the size of the exported PDF document. If this is not applicable for your scenario, and if you have the possibility to change the "Courier New" and replace with another font, I would highly encourage you to do that. Thus, you will be able to preserve exporting the font subset option and keep the optimized document size.

Due to the specificity of the issue and its complexity, these are the possible solution I can suggest. Please make sure that you click the Follow button to get notified for any status changes.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Your perspective matters! Join other professionals in the State of Designer-Developer Collaboration 2025: Workflows, Trends and AI survey to share how AI and new workflows are impacting collaboration, and be among the first to see the key findings.
Start the 2025 Survey
David
Posted on: 30 Sep 2025 12:14

Thanks Dess, I know about the workaround and we are using it for PDFs that we generate ourselves. The main issue I have with it is that it can double the file size of the documents when we do this (I'm guessing this is based on the number of Courier New fields in the document).

The example I generated today, the file went from 1.2 mb to 3.6 mb.

Given that we're processing and saving 100s, sometimes 1000s of documents a day, that's not a reasonable approach for us.

Hope that makes sense.

Dave

ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 30 Sep 2025 11:41

Hello, David,

I am sorry to hear that you are facing any difficulties with the PdfProcessing library and the already known issue.

When only a subset of "Courier New" is embedded, some viewers may fail to display form fields correctly, especially if the font is not installed on the client machine or the encoding is mismatched. Removing JavaScript does not directly affect font embedding, but the export process might change the font subset or encoding, causing compatibility issues.

However, fully embedding the font is expected to have a positive impact on the exported PDF document. In case you are still facing any further difficulties, please let me know.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Your perspective matters! Join other professionals in the State of Designer-Developer Collaboration 2025: Workflows, Trends and AI survey to share how AI and new workflows are impacting collaboration, and be among the first to see the key findings.
Start the 2025 Survey
David
Posted on: 29 Sep 2025 14:50
This is causing an issue for us in some documents, where we are just opening them to remove the javascript and then saving them. If they have Courier New as a font we can get this issue where fields that have Courier New don't display correctly in Adobe Reader or Acrobat 2020.