2006-12-01 Jordi Mas i Hernandez * PrintingServicesWin32.cs: Fixes paper sizes reading. The POINT structure is 8 bytes long not 4. This fixes margins calculations (based on the paper size) that were badly broken. 2006-11-28 Andreia Gaita * PageSettings.cs: - internal member name changes to help out with intelisense. - Use internal members directly instead of using corresponding properties so that exceptions are not thrown * PrintingServicesWin32: - Only return DefaultPrinter if it is actually valid. This is because Win32GetDefaultPrinter returns a printer name even if PrintSpooler is stopped (which should behave the same way as if there are no printers installed) - Do not try to allocate if EnumPrinters returns 0 2006-11-25 Jordi Mas i Hernandez * PrintingServicesUnix.cs: Implements GetPrintDialogInfo 2006-11-24 Carlos Alberto Cortez Initial support for PageSettings (color, copies, collate, and media size). * StandardPrintController.cs: Pass PrintDocument.PageSettings to create the Graphics object (althought PageSettings contains a PrinterSettings and vice versa, PrintDocument can contain non-related PrinterSettings and PageSettings objects). * PrintingServices.cs: Likewise. * PrintingServicesWin32.cs: Likewise. * PrintingServicesUnix.cs: Likewise. Also use cupsParseOptions to pass printing options when calling cupsPrintFile. Use "Custom" as name for custom pages without associated name (Laxmark printers have this problem, causing a nullref exc). Add GetPaperKind () method to retrieve and set the right PaperKind value for PaperSize, instead of using PaperKind.Custom for all page sizes. Finally save PageSettings in DOCINFO to use it later. * PrintDocument.cs: Clone PrinterSettings.PageSettings instead of creating a new one (this avoid creating an additional PrinterSettings instance). 2006-11-17 Andreia Gaita * PrintingServicesWin32.cs: fix another dumb typo - check proper return value from printer validity call 2006-11-16 Chris Toshok * PreviewPrintController.cs: fix typo - don't throw InvalidPrinterException when it wasn't supposed to be. 2006-11-16 Carlos Alberto Cortez * PrintDocument.cs: Use QueryPageSettingsEventArgs.PageSettings in PrintPageEventArgs, instead of using the default one (mimic .Net behaviour). * PageSettings.cs: Implement Clone the right way (intead of using the default page settings). 2006-11-14 Andreia Gaita Fixes #79835, implements PrinterSettings.IsValid, throws proper InvalidPrinterException with differentiated messages. * PrintingServices.cs: Declares IsPrinterValid to enable easy checking if printer name is a valid printer * PrintingServicesWin32.cs: Implements IsPrinterValid, caches last assigned printer name and if it is valid to speed up next calls. * PrintingServicesUnix.cs: Implements IsPrinterValid, caches last assigned printer name and if it is valid to speed up next calls. * PageSettings.cs: - throw InvalidPrinterException in the properties, according to the docs: Color, Landscape, PaperSize, PaperSource, PrinterResolution - change the private fields above to internal, so that in the constructor we can access them without triggering the exceptions if there are no printers installed * PrinterSettings.cs: Implement IsValid to call IsPrinterValid implemented above * PreviewPrintController.cs: throw InvalidPrinterException on StartPrint() if there's no valid printer configured * InvalidPrinterException.cs: New private GetMessage() to customize printer error message, used by constructor 2006-09-27 Jordi Mas i Hernandez * PrintingServicesUnix.cs: Implements LoadPrinterPaperSources member, simplifies GetPaperSizeName and loads paper source and size defaults 2006-09-27 Jordi Mas i Hernandez * PrintingServices.cs: Add LoadPrinterPaperSources member * PrintingServicesWin32.cs: Implements LoadPrinterPaperSources and reads the default paper source and size. * PrintingServicesUnix.cs: Add stub LoadPrinterPaperSources member * PrinterSettings.cs: Implements PaperSourceCollection property and makes default paper source and size from the system. 2006-08-02 Chris Toshok * PreviewPrintController.cs: scale the Graphics context we pass back from OnStartPage such that the preview looks the way the printed output will. 2006-07-28 Carlos Alberto Cortez * PrintDocument.cs: When null is passed to PrinterSettings, it should be set to a new PrinterSettings instance, and should never be null. * PrinterSettings.cs: Default value for Copies should be 1. Also add a space in the ToString method, to correctly show the printer info. 2006-07-26 Chris Toshok * PrinterSettings.cs: expose PrintFileName in the 1.1 case as an internal property, so we can get at it from MWF. * PrintingServicesUnix.cs: handle print to file, and also remove the temp file after sending the data to the printer. fix some dllimports to match the rest of system.drawing. * PreviewPrintController.cs: implement this (warning, it'll eat all your memory until we get a real Metafile implementation, as we're storing bitmaps). * PrintDocument.cs: shift the graphics context stuff around a bit in Print(), so that the events after OnStartPrint are passed the graphics context the controller created there, and we use the return value of OnStartPage to do all drawing. 2006-05-20 Jordi Mas i Hernandez * PrintingServices.cs: GetPrintDialogInfo definition * PrintingServicesWin32.cs GetPrintDialogInfo implementation * PrintingServicesUnix.cs: GetPrintDialogInfo stub 2006-04-14 Jordi Mas i Hernandez * PrintingServicesUnix.cs: Replace cupsGetPrinters deprecated API call 2006-04-13 Jordi Mas i Hernandez * PrintingServicesUnix.cs: Checks if cups is installed * PrinterSettings.cs: PrintToFile property and ToString method 2006-04-28 Sebastien Pouliot * PrintController.cs: corcompare fix. No public ctor in 2.0. * PrinterSettings.cs: corcompare fix. Clone method isn't virtual. 2006-03-21 Sebastien Pouliot * PrintingServicesUnix.cs: cupsGetPrinters(char***) requires to free each individual string and (finally) the list. Note that this call is deprecated. 2006-03-13 Peter Dennis Bartok * PrintingServicesUnix.cs: Handle not having a printer 2006-02-09 Peter Dennis Bartok * PrintingServicesWin32.cs: Simplyfied the code, removing the need for pointer calculations (part of 64bit cleanup) 2006-01-27 Sebastien Pouliot * PrintingServicesWin32.cs: Ensure Marshal.FreeHGlobal is called for all unmanaged memory allocated with AllocHGlobal. 2006-01-15 Jordi Mas i Hernandez * PrintingServicesUnix.cs: Allow setting the dpy's for the surface 2005-12-22 Jordi Mas i Hernandez * PrintingServices.cs: Printing services abstration class * PrintingServicesWin32.cs: Win32 printer driver * PrintingServicesUnix.cs: Unix printer driver * Margins.cs: Fixes exceptions error messages * PrinterResolution.cs: Fixes * PrintEventArgs.cs: New internal method * PrintPageEventArgs.cs: New internal method * StandardPrintController.cs: Fixes * PrinterUnitConvert.cs: Fixes conversion errors * PrintDocument.cs: Fixes to make it print * PageSettings.cs: Take margains into account * PrintController.cs: Fixes * PaperSize.cs: Method to set paper Kind * PrinterSettings.cs: Implements settings and fixes * 2005-12-07 Jordi Mas i Hernandez * PrinterResolutionKind.cs: Fixes signature for .Net 2.0 * PaperKind.cs: Fixes signature for .Net 2.0 * PaperSource.cs: Fixes signature for .Net 2.0 * Margins.cs: Fixes signature for .Net 2.0 * PrinterResolution.cs: Fixes signature for .Net 2.0 * PrintEventArgs.cs: Fixes signature for .Net 2.0 * PrintAction.cs: New enum in .Net 2.0 * PageSettings.cs: Fixes signature for .Net 2.0 * PaperSourceKind.cs: Fixes signature for .Net 2.0 * PrintController.cs: Fixes signature for .Net 2.0 * Duplex.cs: Fixes signature for .Net 2.0 * PaperSize.cs: Fixes signature for .Net 2.0 * PreviewPrintController.cs: Fixes signature for .Net 2.0 * PrinterSettings.cs: Fixes signature for .Net 2.0 * PrintRange.cs: Fixes signature for .Net 2.0 2005-09-16 Sebastien Pouliot * InvalidPrinterException.cs: Removed NotImplementedException (not required) and added a demand for SerializationFormatter on the GetObjectData method. * PrintingPermission.cs: Throw ArgumentException if the class or version attributes are missing in the supplied XML (only in 1.x). 2005-03-23 Jordi Mas i Hernandez * PaperKind.cs: fixes wrong enum values 2005-01-27 Lluis Sanchez Gual * MarginsConverter.cs: Implemented support for InstanceDescriptor.