pdf.SetUnicode() migrated to?

Hello,

what’s the equivilant of setUnicode() in the new Aspose.Pdf.Document architecture. I’m expierencing a problem with using foreign characters after the migration propably because i couldn’t translate this line.

@panosk

Thank you for contacting support.

You may set custom font for any text fragment with FontRepository.FindFont method as explained in Formatting PDF Document. Or you can connect custom font directory to use custom or foreign characters in your documents.

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

In case the problem persists then please share source and generated files along with narrowed down code snippet so that we may try to reproduce and investigate it in our environment. Moreover, please ensure using Aspose.PDF for .NET 18.12.

Thank you for your reply,

i don’t want to use a specific font from my folders, i would like to have the equivillant of setUnicode() in the new approach ( Aspose.Pdf.Document pdf) . I’m trying to convert txt files to pdf. It was working fine in previews versions of Aspose while including the pdf.setUnicode() function.

@panosk

Would you please share narrowed down code snippet along with source and generated files so that we may try to reproduce and investigate it to help you out.

            Aspose.Pdf.Document pdf1 = new Aspose.Pdf.Document();
            Aspose.Pdf.Page page = pdf1.Pages.Add();

	 System.IO.TextReader objReader = new System.IO.StreamReader(inputFile);
	 do
            {
                Aspose.Pdf.Text.TextFragment t2 = new Aspose.Pdf.Text.TextFragment(objReader.ReadLine());
                page.Paragraphs.Add(t2);
            } while (objReader.Peek() != -1);

        objReader.Close();
            pdf1.Save(outputFile);

@panosk

Thank you for sharing the code.

We also need your source and generated files to investigate it in our environment. Please ZIP and then upload respective files.

Here are the source and generated files.

testDocs.zip (65.6 KB)

@panosk

Thank you for sharing requested data.

We have logged a ticket with ID PDFNET-45874 in our issue management system for further investigations. We will let you know as soon as some significant updates will be available in this regard.

Hello,

do you have any updates regarding the issue?

@panosk

Thank you for getting back to us.

We are afraid PDFNET-45874 has not been scheduled yet. We have recorded your concerns and will update you as soon as some significant updates will be available.

Hello,

Any Updates about the ticket above ?

@alterawiwork

Regretfully, the ticket is not yet resolved. We will surely update in this forum thread as soon as we have some news in this regard. Please give us some time.

Hi @asad.ali ,

This issue is also a roadblock for us. Do you know roughly when this will be fixed? We have to make a decision whether to purchase the license now or wait later. I understand that we only have a year to get fixes after purchasing.

@elao

We are currently investigating the earlier logged ticket and will surely inform you as soon as it is resolved. We are afraid that we cannot share an ETA before it is fully investigated. We really appreciate your patience and comprehension in this matter. Please give us some time.

We apologize for your inconvenience.