Hi
I have a problem using the PdfViewer class (Aspose.Pdf.Kit version 4.0.0.0) to print the PDF document when using a memory stream as its data source.
You can see the document getting added to the print queue all right but it immediately deletes itself from the queue meaning it never gets printed. Here’s the code I’m using:
public void Print( PrinterSettings printerSettings )
{
if ( printerSettings == null || this.m_PdfDataStream == null ) {
return;
}
PdfViewer viewer = new PdfViewer();
viewer.OpenPdfFile( this.m_PdfDataStream );
viewer.PrintPageDialog = false;
viewer.AutoResize = true; // print the file with adjusted size
viewer.AutoRotate = true; // print the file with adjusted rotation
viewer.PrintDocumentWithSettings( printerSettings );
viewer.ClosePdfFile();
return;
}
I have also attached the saved PDF file for reference.
Thanks in advance
Simon
Hi Simon,
We’re looking into this issue at our end and you’ll be updated with the results the earliest possible.
We’re sorry for the inconvenience.
Regards,
Hi Simon,
I have reproduced this problem at my end and logged it as PDFKITNET-18705 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.
We’re sorry for the inconvenience.
Regards,
Hi
Thanks for the info.
For reference the same issue also affects this as well:
public void Print( string filename, PrinterSettings printerSettings )
{
if ( filename == null || printerSettings == null || filename.Trim() == “” ) {
return;
}
if ( !File.Exists( filename ) ) {
return;
}
PdfViewer viewer = new PdfViewer();
viewer.OpenPdfFile( filename );
viewer.PrintPageDialog = false;
viewer.AutoResize = true; // print the file with adjusted size
viewer.AutoRotate = true; // print the file with adjusted rotation
viewer.PrintDocumentWithSettings( printerSettings );
viewer.ClosePdfFile();
return;
}
Thanks again
Simon
Hi
Is there another way of sending the PDF document to the printer using Aspose until this issue is resolved
Thanks
Simon
Hi Simon,
I’m sorry to inform you that PdfViewer is the only class which can help you print the PDF files using Aspose component; I’m afraid, there is no alternative available at the moment. However, our team will investigate this issue in detail and you’ll be updated with the resolution the earliest possible.
We’re sorry for the inconvenience. If you have any further questions, please do let us know.
Regards,
Does this same issue occur in the latest version of Aspose.Pdf.Kit, if so is their an ETA for a fix
Thanks
Simon
Hi Simon,
This issue is not resolved in the latest version and I’m afraid, we’re unable to share the ETA at the moment. I have asked our development team for the ETA of this issue and you’ll be updated once we get a better idea.
We’re sorry for the inconvenience.
Regards,
The issues you have found earlier (filed as 18705) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.