We're sorry Aspose doesn't work properply without JavaScript enabled.

# Failure to Render Correct Typeface

I have a PDF that is using the Marlett True Type font to display checkboxes. Marlett is installed on the server.
When I use this PDF as one of many PDF files joined to a single output PDF, the checkboxes are incorrectly rendered as tiny open or closed spots.

When I take the same PDF and burst its pages to single page JPEG files, it does the same.
When I take the same PDF and burst its pages to single page TIFF files, it does the same.
I am using Aspose.PDF for .NET 18.7.

How can I process the PDF without incorrectly rendering the checkboxes?

(I have an example file, but I do not see a means to upload it to this forum.)

@varsoil

Thank you for contacting support.

The problem must be occurring because you are using Custom Font in your PDF file which may not be referenced while rendering that specific PDF document. Therefore, you can load a folder containing that custom font with the lines of code below, and also embed Marlett font in that PDF file as explained in Formatting PDF Document.

// connect custom font directory
FolderFontSource fs = new FolderFontSource(@"path\to\my\folder");
FontRepository.Sources.Add(fs);


Moreover, you can upload any file or a zipped archive by using the upload button in header of the post editor. Please see this screenshot for your kind reference HowToUpload.png, or you can drag and drop files as well.

We hope this will be helpful. In case the issue persists, please share the source PDF document and zipped font file along with the code snippet so that we may try to reproduce and investigate it in our environment.

Thank you very much for the prompt response. I am not the author of the input PDF and I do not think an can influence the author to make the change. Can the problem be solved merely with the FolderFontSource code, or are both changes needed?

I will package up the code and files after attempting the connect custom font directory suggestion.

@varsoil

You do not necessarily need to be the author or owner of that PDF file because any font can be embedded to existing PDF file as mentioned in the documentation article we have already shared with you. Embedding that font would ensure that PDF document is displayed fine on any platform irrespective of Marlett font installation. Whereas, loading custom font will improve rendering to JPEG,TIFF or any other file format without any problems.

Please take your time and get back to us as per your convenience.

That fixed the problem. Thanks so much for the help.

1 Like