PDF font is not the same as compared to the PDF generated by Apache FOP utility

Hello,
Used the below code snippet to convert xml and xslt to PDF. Conversion is working fine, but we see slight difference in Font in the output PDF comparted to the PDF generated by Apache FOP utility.

Code snippet:

void convertPanelAsset(System::String xmlFile, System::String xsltFile, System::String pdfFile)
{
	try
	{
		std::cout << "Generating PDF from xml...\n";
		// Instantiate XslFoLoadOption object
		auto options = MakeObject<Aspose::Pdf::XslFoLoadOptions>(xsltFile);
		// Create Document object
		auto pdfDocument = MakeObject<Aspose::Pdf::Document>(xmlFile, options);
		
		pdfDocument->Save(pdfFile);
	}
	catch (System::Exception ex)
	{
		std::cerr << ex.what();
		throw;
	}
}

@Janci

Could you please share the sample source XML/XSL files along with generated PDF files by both Aspose.PDF and Apache FOP utility? We will test the scenario in our environment and address it accordingly.

Hello,
Please find the attached files.

Aspose_pdf.7z (278.2 KB)

Regards,
Janci

@Janci

We could not find the XML file in the archive that you shared. Can you please add the XML file as well so that we can test the scenario accordingly?

My apologies, missed the xml file.SIT_RDSuite_67_DAContentWithNoValues.7z (2.0 KB)

Regards,
Janci

@Janci

We tried to test the scenario using Aspose.PDF for C++ 22.6 and noticed that the API kept consuming memory up to 2.xGB and did not produce any results after 10 minutes of execution. Furthermore, we also checked the output PDF shared by you and it looked like it was generated using Aspose.PDF for Java 22.2. Could you please share a bit more details about you IDE? Also, please try to use the latest version of the API along with a valid license and share the output with us as well. We will further proceed accordingly.

@asad.ali,
Please update the line no:21 with available image file name in your system. The unavailability of this file is causing this issue. The lines are given below.

<xsl:attribute name=“background-image”>
** xsl:textfile://C:\Users\jancha71\Downloads\background1.png</xsl:text>**
** </xsl:attribute>**

Our Legal team is working on getting the licensed version of Aspose. But we need the confirmation if this conversion is working as expected. If needed we can schedule a working session. Please confirm us the possibility of getting the expected output and steps to achieve the same.

Thanks,
Janci

@asad.ali,
The version used is 22.6 (latest version)

Thanks,
Janci

@Janci

Please find the attached output PDF that was generated at our end using Aspose.PDF for C+ 22.6. Indeed, the font was slightly different. It looks like an “MT” text is added to the Arial font name in the PDF generated by Apache FOP. Would you please confirm if the file generated by Apache FOP is the desired one? And you want to generate similar results using Aspose.PDF?aspose.pdf (224.2 KB)

@asad.ali
Yes, the expectation is for the results using Aspose.pdf to match the file generated by Apache FOP. Please let me know the possibility of achieving the expectation?

Thanks,
Janci

@Janci

We have logged an issue as PDFCPP-1939 in our issue tracking system to investigate this case further. We will look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.