The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
what kind of datatype is expected in: pdfviewer1.PrinterSettings.Pagesize ?
I know that PdfViewerPrintSize.Fit return INT32 type, but I got error if I use syntax above ? The error is Attribute Mismatch in Expression and in log files I found: Unable to cast object of type 'Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings' to type 'System.Type'.
I am not using Visual Studio C#, but Magic XPA v3.xx
PEPriyanga Elangovan Syncfusion Team March 9, 2018 01:44 PM UTC
Hi Vili,
Thank you for contacting Syncfusion support.
The API “pdfViewerControl1.PrinterSettings.PageSize” accepts “Syncfusion.Windows.PdfViewer.PdfViewerPrintSize” type values and we are unable to reproduce the type casting error while using the following code in PdfViewer Windows forms.
Kindly provide the following details to reproduce the issue at our end.
Simple sample along with the input document
Operation System:
.Net Framework:
Syncfusion Essential Studio Version:
RAM:
System Culture Information:
Regards, Priyanga.E
PEPriyanga Elangovan Syncfusion Team March 9, 2018 01:45 PM UTC
Hi Vili,
Thank you for contacting Syncfusion support.
The API “pdfViewerControl1.PrinterSettings.PageSize” accepts “Syncfusion.Windows.PdfViewer.PdfViewerPrintSize” type values and we are unable to reproduce the type casting error while using the following code in PdfViewer Windows forms.
Kindly provide the following details to reproduce the issue at our end.
Simple sample along with the input document
Operation System:
.Net Framework:
Syncfusion Essential Studio Version:
RAM:
System Culture Information:
Regards, Priyanga.E
VCVili CANKARMarch 12, 2018 11:07 PM UTC
Hi,
thanks for the sample and I could confirm that works with VS2012. But As I said, I don't use VS but Magic XPA and everything else work, except this function ... Something is wrong with enum datatype ...
Is it possible to cast numerical values (0,1,2) to viewer.PrinterSettings.PageSize ?
Regards
PEPriyanga Elangovan Syncfusion Team March 14, 2018 12:50 PM UTC
Hi Vili,
Currently, we are trying to create the sample using Magic XPA software to reproduce the issue at our end. We will update the details once we have completed the sample creation using Magic XPA software.
Meanwhile can you please provide the simple runnable sample which has been created using Magic XPA software to reproduce the issue at our end? It will be more helpful to assist you better and provide the proper solution at the earliest.
PEPriyanga Elangovan Syncfusion Team May 18, 2018 10:13 AM UTC
Hi Vili,
Thank you for your patience.
We have finished analyzing the reported issue “Type casting error is thrown while setting the values to PageSize property of PrinterSettings”. We have confirmed it as defect and logged a defect report for the same. We will resolve this issue and include the fix for this issue in our 2018 Volume 2 SP1 release which will be available in the month of June 2018.
Regards, Priyanga.E
Need More Help?
Get personalized assistance from our support team.