Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Dec 14, 2021 4:48 pm

I have an Web API where I download a Spire PdfDocument to a Xamarin form. I am using FreeSpirePdf 7.8.9 for both the API and the Xamarin Form. In the Xamarin Form I am fetching the pdf like this:

Code: Select all
PdfDocument report = await GetInvoiceReportAsync(myReport, App.LastInvoiceNumber);
report.Print();


However, Print is not an option for my report, neither is PrintSettings.

What am I doing wrong. Why do I not have a print option in Xamarin? The Print option is available in the Web API.
Last edited by randygordey on Tue Dec 14, 2021 5:00 pm, edited 1 time in total.

randygordey
 
Posts: 6
Joined: Tue Dec 14, 2021 4:37 pm

Tue Dec 14, 2021 4:57 pm

Additionally, my Xamarin Forms will be running in a UWP application.

randygordey
 
Posts: 6
Joined: Tue Dec 14, 2021 4:37 pm

Wed Dec 15, 2021 7:49 am

Hello,

Thanks for your inquiry!

Kindly note that the Xamarin Form use the dlls under the MonoAndroid and the UWP applications used the dlls under the netstandard2.0, but sorry that our FreeSpire.PDF for net does not support Print() method under these frame works now.

Do you want to call the Print() method on Xarmarin.Forms to realize the printing of the application on your mobile terminal? If so, do you print by calling the printer driver which has installed on your mobile device? Or just need to initiate a request to call the printer on your server to print the file?

Please describe your needs in detail to help us better investigate whether our products can meet your needs. Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Wed Dec 15, 2021 12:32 pm

I intended to use the installed printer from the UWP host Windows machine like this:

Code: Select all
pdf.PrintSettings.PrinterName = "Printer Name";


As a work around, I am now printing from my Web API (IIS) directly, which is working.

However, I also need to Print to a POS Bluetooth Receipt printer attached to the UWP application, as this printer will not be installed to the Web API server machine.

randygordey
 
Posts: 6
Joined: Tue Dec 14, 2021 4:37 pm

Thu Dec 16, 2021 2:45 am

Hello,

Thanks for sharing more information!

Since the current UWP project is based on the .netstandard platform, we are sorry that our product does not support printing based on the .netstandard platform now.

However, the latest .NET 6.0 has integrated and included the Xamarin framework. We are currently developing the mobile terminal version based on .NET 6.0, and I have submitted the requirement of supporting print on the mobile terminal to our dev team for further investigation. Once there is any progress regarding this, we will notify you immediately.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF

cron