I got an error with aspose pdf dll 25.1.0.0 in window exe

Hi sir ,

               I use the below code  to set license and use pdf document. In  window exe

I use aspose pdf dll 25.1.0.0 vserion

Dim PDFLicense As Aspose.Pdf.License = New Aspose.Pdf.License()
PDFLicense.SetLicense(LicensePath)

Dim options As Aspose.Pdf.XpsLoadOptions = New Aspose.Pdf.XpsLoadOptions()
Dim document As Aspose.Pdf.Document = New Aspose.Pdf.Document(inputfile, options)
document.Save(outputfile)

When i run the exe i go this error

image.png (11.4 KB)

I code no error show.

image.png (18.2 KB)

i use word license also that not show error but pdf only show error

@psd.senthilnathan

It appears you are encountering an error while using Aspose.PDF version 25.1.0.0 with the provided code. The issue may be related to the file format of the input file or the way the XpsLoadOptions are being utilized.

Here are some steps to troubleshoot the problem:

  1. Check Input File Format: Verify that the inputfile you are trying to load is indeed in XPS format. If it is not, you will need to use the appropriate load options for the actual file format.

  2. Error Handling: Implement error handling to capture the specific exception being thrown. This can provide more insight into what is going wrong. For example:

    Try
        Dim document As Aspose.Pdf.Document = New Aspose.Pdf.Document(inputfile, options)
        document.Save(outputfile)
    Catch ex As Aspose.Pdf.PdfException
        Console.WriteLine("PDF Exception: " & ex.Message)
    Catch ex As Exception
        Console.WriteLine("General Exception: " & ex.Message)
    End Try
    
  3. Update Aspose.PDF: If possible, consider updating to a newer version of Aspose.PDF, as there may have been bug fixes or improvements since version 25.1.0.0.

  4. Consult Documentation: Review the official documentation for XpsLoadOptions and the Document class to ensure you are using them correctly.

If the issue persists, please provide the exact error message or exception details to assist in further diagnosing the problem.

Hi sir,

       Thanks for reply as per ur suggestion i replace latest DLL of PDF now work, but i have license up to January 2025.

image.png (19.1 KB)

can use new dll without water mark

@psd.senthilnathan

We strongly recommend using the latest version of the API, as support is primarily provided for it. The latest version includes the most fixes and improvements. The issue you’re encountering in version 25.1 might be related to your specific environment or configuration. Please try creating a new standalone console application and test again. Additionally, consider changing the .NET Framework version. We hope this resolves the problem.