Im new to reflections so its been a trip. The issue i have is setting the properties in the nested class printjobprintoptions
ie
PropertyInfo CopyNum = DllType.GetProperty("PrintJobPrintOptions.Copies");
isnt correctly assigning copyNum so i can getvalue/setvalue on it.
What am i doing wrong please?
thanks
Woody
using reflections
Re: using reflections
Support · Mar 30, 2011Hello Woody,
Please try the below code, it should give you the correct property info object.
PrintJob pdfprinter = new PrintJob(Printer.Default, @"test.pdf");
PropertyInfo info = pdfprinter.PrintOptions.GetType().GetProperty("Copies");
Thanks,
ceTe Software Support Team.
Re: using reflections
Forum member · Mar 30, 2011Sorry,
i dont see how thats going to work....
im using reflections since im loading the dll from a remote server.
so i dont have a PrintJob item..
System.Reflection.Assembly PrtDll = System.Reflection.Assembly.LoadFile(Get_Dll_Path(CurrentMode));
System.Type DllType = PrtDll.GetType("ceTe.DynamicPDF.Printing.PrintJob", true);
PrtMethod = DllType.GetMethod("Print");
PrintStatus = DllType.GetProperty("Status");
Re: using reflections
Support · Mar 31, 2011Hello,
We recommend referencing the dll directly in the .NET project, so we don't have any working sample that shows how to use reflection with the PrintManager dll. There is nothing in the dll that is preventing you from using reflection and accessing the public methods or properties.
Thanks,
ceTe Software Support Team.
Re: using reflections
Forum member · Apr 21, 2011I got it working thru reflections. It was a bit intense but it is working.