I’m evaluating Aspose.PDF for use as an XPS to PDF converter inside of a larger .NET application. When trying to convert certain XPS documents, I am encountering the following exception.
Exception during XPS to PDF: System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap…ctor(Stream stream)
at ??.?▲:heart:.▼∟⌂(XmlNode )
at ??.?▲:heart:.??(XmlNode )
at ??.?▲:heart:.?∟⌂(XmlNode )
at ??.▲?▲:heart:.??☼(XmlNode , ↑?☼:diamonds: )
at ??.⌂?▲:heart:.?∟⌂(XmlNode , ↑?☼:diamonds: )
at ??.⌂?▲:heart:.?∟⌂(XmlNode , ↑?☼:diamonds: )
at ??.??▲:heart:.?∟⌂(XmlNode )
at ??.?.↑:left_right_arrow:⌂(String )
at ??.?.Convert(Stream )
at ??.???.Convert(Stream , ?? )
at ?♫.¶.??☼(Stream , Document , XpsLoadOptions , Boolean )
at Aspose.Pdf.Document.→?(Stream , LoadOptions )
at Aspose.Pdf.Document…ctor(Stream input, LoadOptions options)
at TestPDFConversion.Program.XpsToPdf(Stream xpsFile) in c:\builds\STX-HostAgents-RemotePrinting\TestPDFConversion\Program.cs:line 48
This is using version 1.11.0.0 of Aspose.PDF, the attached XPS file, and the following Aspose code.
var xpsStream = File.Open(filename, FileMode.Open); MemoryStream pdfStream = new MemoryStream(); Document document = new Document(xpsStream, new XpsLoadOptions());
Thanks for your inquiry. I have tested your scenario with shared XPS document using Aspose.Pdf for .NET 11.3.0 and managed to observe the reported exception. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-40325 and also linked your request to it. We will keep you updated via this thread regarding the issue status.
Thanks for your feedback. I am afraid your issue is still not resolved, our product team is busy in resolving the issues in the queue, reported earlier. As soon as our product team completes the investigation of the issue then we will share any ETA/findings with you. We will keep you updated about the issue resolution progress.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.