Hi Ubaldo,
In reference to the Aspose.Pdf API, please use the source code as below:
[.NET, C#]
<span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// load the source file<span style=“color: rgb(0, 0, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>
PdfFileInfo info = <span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>new<span style=“color: rgb(0, 0, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”> PdfFileInfo(“C:/PDFTEST/34445.pdf”);<span style=“color: rgb(0, 0, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>
<span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// determine if the file is PDF<span style=“color: rgb(0, 0, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>
Console.WriteLine(info.IsPdfFile);
Please let us know in case of any confusion or questions.