PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

PDF Sharp in Parallels
http://forum.pdfsharp.com/viewtopic.php?f=2&t=4658
Page 1 of 1

Author:  davidklecker [ Fri Aug 23, 2024 12:36 pm ]
Post subject:  PDF Sharp in Parallels

I have created a Blazor ASP.NET 8 Core Web Assembly application. It is also wrapped in an Electron Layer so it can be used as a desktop application. I am using PDFSharp to generate and print to a PDF document and I am able to see results on my machine which is natively running Windows 11.

I have a beta tester running the same application on Parallels on a Mac. When they go to print nothing happens. I had them go into the Event Viewer to see if it is returning an error. It appears to not even be able to determine an HTTPS port to open. We tried seeing if CHATGPT might be able to help with trouble shooting and these were the ideas it gave us.

Check HTTPS Configuration in the Application

HTTPS Configuration: Ensure that the application is properly configured to use HTTPS. The middleware is attempting to redirect to an HTTPS port, but it can’t find one.
• Application Settings: Check the application’s configuration files (e.g., appsettings.json or launchSettings.json in ASP.NET Core) to ensure the httpsPort is properly set. You might see something like "httpsPort": 443" or "sslPort": 5001".

I'm not sure if this is something on the PDFSharp side of things or not.

2. Verify SSL Certificate Availability

SSL Certificates: The application might be configured to use an SSL certificate that’s not available in the virtual machine. Ensure that the necessary SSL certificates are installed and accessible.
• Development Certificates: If this is a development environment, try to ensure the development certificate is properly installed and trusted. You can do this by running dotnet dev-certs https --trust in the command line.

I'm not sure if this is something on the PDFSharp side of things or not.

Check for ARM Compatibility Issues

• ARM Compatibility: Some .NET libraries or features might have compatibility issues on ARM architecture. Check if PDFSharp or any related dependencies have known issues with ARM, and if so, consider finding ARM-compatible alternatives or workarounds.

Could this be worth doing?

Event Viewer: The error in the Event Viewer points specifically to the HttpsRedirectionMiddleware of ASP.NET Core, which is responsible for redirecting HTTP requests to HTTPS. The failure to determine the HTTPS port suggests a misconfiguration or missing dependency.

What dependency could i be missing?

Edit: I guess the first question I should be asking, anyone else try running PDFSharp on parallels? I have also ran into an issue where if PDFSharp code runs into a bad path, the whole process stops without error. It's as if it didn't print, but there was an error where the path was wrong. If a person runs the application on a native computer and it works and then runs on Parallel where it doesn't, could there be a path issue?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/