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

Free Support Forum - aspose.com

Currency symbol is not showing on PDF

We have purchased the Aspose.Total license OEM Site, where we using Aspose.Words to prepare the document using html and then converting to PDF.

say: Amt():

In Windows it’s working fine for currency symbol but when we deploy on Linux server, it shows as box as follows after migrating to .net 6.0

With previous .Net core 3.1 it was fine.

Amt(): 9978.84

And we are already using the latest Skiasharp to load it but still not working. please suggest on it.

@VenkateshBT Could you please attach your input and output documents here for testing? We will check the issue and provide you more information.

EWB_1EWB140215 (1).pdf (39.2 KB)
Template.zip (19.5 KB)

I have uploaded the template file which is html and pdf generated out of that in linux server after .net 6.0 migration.

Please check this asap and help as we are required to move to production.

I’m using below versions:

<PackageReference Include="Aspose.PDF" Version="20.5.0" />
<PackageReference Include="Aspose.Words" Version="20.5.0" />

If I upgrade the word / pdf versions, i get alignment distortion which is very bad again.

@VenkateshBT The problem occurs because Liberation Sans font used for rendering the document does not have a glyphs for symbol. If render the document using Verdana font, the symbol is rendered fine.
To gen an accurate rendering result, the fonts used in the source document should be present on the machine where the document is rendered. Otherwise the missed fonts are substituted. You can implement IWarningCallback to get notification when font substitution is performed.

Could you please suggest with current implementation, what is the font is required to install on server so i will get the rupee symbol on PDF.

@VenkateshBT Please try installing Verdana font.

Sure will check and update you on this. But why this happening after .Net 6.0 Migration.

It was working fine with .Net core 3.1.

Even if we upgrade the aspose words verison to higher, it creates the problem of style distortion. Any resolution for this ?

@VenkateshBT Do you migrate only .NET version or your application also has been migrated to another server? I am doubt the problem is related to .NET version, since The same is reproducible with any .NET version if the only available font is Liberation Sans

Regarding document formatting. HTML is not a native format for Aspose.Words. Since HTML and MS Word documents formats are quite different, there is no guaranty that the HTML document will look exactly the same as it look in the browser after converting it using Aspose.Words. While loading HTML documents Aspose.Words in most cases mimics MS Word.

I have just migrated the .net core 3.1 to .net 6.0 and server is same.

I had to rolloback the aspose version from 23.1.0 to 20.5.0 bcs of alignment issue as we have many pdf html templates and cannot align again so.

@VenkateshBT Please try using the following code to fix the problem with tables:

Document doc = new Document(@"C:\Temp\in.html");

NodeCollection tables = doc.GetChildNodes(NodeType.Table, true);
foreach (Table t in tables)
    t.AutoFit(AutoFitBehavior.AutoFitToWindow);

doc.Save(@"C:\Temp\out.pdf");

Still same issue after installing the verdana. PFA pdf generated

EWB_1EWB140201 (1).pdf (37.6 KB)

Please check this and help me to resolve.

@VenkateshBT Unfortunately, I cannot reproduce the problem on my side. Which version of Verdana font is installed on your side? Here are the Verdana fonts I have used for testing: fonts.zip (523.7 KB)
The version is 5.33.
Here is the output document produced on my side: out.pdf (33.7 KB)

Superb. It worked now. Thanks a lot for the suggestion.

Will connect with you later for the next issue.

1 Like