aspose-pdf / Aspose.PDF-for-.NET

Aspose.PDF for .NET examples, plugins and showcase projects
MIT License
137 stars 59 forks source link

exception on Ubuntu dotnet6.0 #28

Open xinyu391 opened 2 years ago

xinyu391 commented 2 years ago

Environment: Ubuntu 22.04, dotnet6.0.100 sdk : Bin/net6.0 Aspose.PDF_22_6.zip (dll only) code:

using System;

using System.IO;
using Aspose.Pdf;
using Aspose.Pdf.Text;

namespace pdf_toolbox
{
    public class NumberPdf{
        public void doNumber(){
            Console.WriteLine("numberPDF....");
            Document doc = new Document();
            Page page = doc.Pages.Add();
            page.Paragraphs.Add(new Aspose.Pdf.Text.TextFragment("Hello World!"));
            doc.Save("HelloWorld_out.pdf");
        }
    }
}

log exception:

numberPDF....
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
   at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
   at #=ztrFjUrbJYJ47NcR$8LZPthQIUnYfExa7Gg==.#=zJGcmwbM=(#=z8S5r434= #=z844B2I8=)
   at #=z2ZQc$Jcr34z9F64PqOoAxo6zJGdn_ZZShQ==.#=zYasEy4MKvAnG`2.#=zVigH4Ju$VQvV(#=z8S5r434= #=z844B2I8=, #=zmDMNKIw=& #=ztxptzkQ=)
   at #=zQ_oajpj9GYnwC_x_$CeW5sq5gwYzvZnJTeNLm28=.#=z1VnSO5vegSOD(#=zD4i4y_M$HiiP_8I17jzHejk_l_WY #=zyphWEqwLFT3f)
   at #=zFLKHFi4q9yQT1s7qN9F3Pv5T0nRo0qWzQmpbNnoq3YDi.#=zZyoz9Osy_H4G()
   at #=zFLKHFi4q9yQT1s7qN9F3Pv5T0nRo0qWzQmpbNnoq3YDi.#=zMO8ucBo=()
   at #=zQJkE9Lf6vNZzWxdK0PxKoHTE9hWkASZ5zNdndNZOH$KI.#=zDsDANj0=(#=zIrdqJtR4jlHtd_Q9LhynyGAYkowV #=zQ$qH$4U=, #=zLS0bXYESTwt6s9O9ge8mOCQdQu2XgiesZQ== #=zk6jw8Bs=, #=zk_baTkeGsSyYK2fUlwbWQSTWwiuje5rVhDZznXUVXMgE #=ziSVaJls=)
   at Aspose.Pdf.Page.CalculateContentBBox()
   at Aspose.Pdf.Page.#=z1bMZ4IQ=(Page #=zk6jw8Bs=)
   at Aspose.Pdf.Page.#=zSmp$qf7iRTeUfaT1ow==()
   at Aspose.Pdf.Document.ProcessParagraphs()
   at Aspose.Pdf.Document.#=zG7VhpvNMzChd(Stream #=zB8p3Dxo=, SaveOptions #=zsRZvAOZNkW4o)
   at Aspose.Pdf.Document.#=zFx2Xbgl0fHER(String #=zu4ufdYNMrcDG)
   at Aspose.Pdf.Document.Save(String outputFileName)

It doesn't support net6.0 ?

xinyu391 commented 2 years ago

Is anyone there?

gregfullman commented 2 years ago

I'm seeing this behavior as well

asadalikhan90 commented 1 year ago

@xinyu391 @gregfullman

We apologize for the delayed response. Please note that we recommend and encourage posting such issues in our official support forum where you can track the issue resolution progress appropriately. Nevertheless, could you please try using Aspose.PDF.Drawing package from Nuget instead of Aspose.PDF? In case issue still persists, please create a post in Aspose.PDF Support Forum as requested before and we will assist you there accordingly.