1 2007-02-21 Andreia Gaita <avidigal@novell.com>
3 * PrintingServicesUnix.cs: Report an error in the console if there is
4 a problem opening the printer.
6 2007-02-21 Andreia Gaita <avidigal@novell.com>
8 * PrintingServicesUnix.cs: don't free up pointers unnecessarily (doh)
10 2007-02-21 Andreia Gaita <avidigal@novell.com>
12 * PrintingServicesUnix.cs: add checks and try blocks to make sure
13 things don't blow up if we try to double free anything (not that
14 we're trying to do anything like that :p )
16 2007-02-21 Andreia Gaita <avidigal@novell.com>
18 * PrintingServicesUnix.cs: fix a double-free bug
20 2007-02-20 Andreia Gaita <avidigal@novell.com>
22 * PrintingServicesUnix.cs: Fix leak caused by not calling cupsFreeDests
23 on certain codepaths. Fix return value of cupsFreeDests to void.
25 2007-02-20 Andreia Gaita <avidigal@novell.com>
27 * PrintingServicesUnix.cs: Correct missing static initialization
28 of loaded printers hashtable, unit tests were failing (oops :p)
30 2007-02-17 Marek (please complete)
32 * PrintPreviewController, InvalidPrinterException:
35 2007-02-16 Andreia Gaita <avidigal@novell.com>
37 Redesign how and when cups gets called to minimize
38 p/invokes, implements caching of printers and printer
39 settings as per calberto's patch - #79822, plotter detection,
40 duplex, fixes for image disposing, code modularization,
43 * PageSettings.cs: Check and ignore null setter values on
44 paper sizes, sources and resolutions.
46 * PaperSize.cs: Add default paper size flag
48 * PaperSource.cs: Add default paper source flag, minor code
51 * PrinterSettings.cs: Add duplex and plotter implementation,
52 modify calls to PrintingServices to support caching, add
53 a printer capabilities list to store specific printer options -
54 only loaded with cups, for now. Move the internal list classes
55 to the end of the code so as not to clutter.
57 * PrintingServices.cs: Separate the PrintingServices class in 2 -
58 PrintingServices and GlobalPrintingServices (see calberto's patch
59 in #79822). The PrintingServices class is where all the methods
60 caching information reside, the GlobalPrintingServices methods do
62 The cached information resides on the Printer class, added to the
65 * PrintingServicesUnix.cs: Big rewrite.
66 - Essentially, redesigned and modularized the code to minimize cups
67 calls. Then, applied the caching so all the cups calls are reduced
68 to a minimum, by loading a list of printers onto a hashtable, then
69 loading the settings of the chosen printer and saving that in the
70 hashtable all in one go.
71 - Also, fixes for loading the proper default values of the printer,
72 which are stored in it's global options;
73 - Modularization of cups/ppd loading methods (LoadPrinterOptions,
74 LoadOptionList, OpenPrinter, ClosePrinter) so we don't repeat
75 cups/ppd loading loops everywhere.
76 - Proper disposing of pointers and structures, calling the proper
80 * PrintingServicesWin32.cs: IsPrinterValid is no longer caching the value,
81 since it should be supporting global caching as well, though that is not
82 yet complete on win32. Implements plotter detection support, and changes for
83 the new PrinterSettings/GlobalPrinterSettings structure. Some minor changes
84 the code to minimize p/invoke calls (load the printer sources and sizes
85 before accessing the collections)
87 * StandardPrintController.cs: PrinterSettings/GlobalPrinterSettings structure
90 2007-02-09 Sebastien Pouliot <sebastien@ximian.com>
92 * PrintingServicesUnix.cs: Ensure we free the original pointer in
93 GetAlternativeDefaultPrinter (not the one used for iteration).
95 2007-01-19 Andreia Gaita <avidigal@novell.com>
97 * PrintingServicesUnix.cs: Add is_default flag check for
98 detecting default printer when cupsGetDefault doesn't return
99 valid values (mainly ubuntu). Fixes #80198, #80519
101 2007-01-09 Sebastien Pouliot <sebastien@ximian.com>
103 * PrintingServices.cs: Unify platform detection code.
105 2006-12-04 Carlos Alberto Cortez <calberto.cortez@gmail.com>
107 * PrintingServicesUnix.cs: Add "landscape" option
108 when using PaperSettings.Landscape set to true. Also
109 swap the width and height for the postscript file.
111 2006-12-01 Andreia Gaita <avidigal@novell.com>
113 * PrintingServicesUnix: Proper size structure use for 64 bit
116 2006-12-01 Andreia Gaita <avidigal@novell.com>
118 * PrintingServicesUnix: *properly* check return value from
119 cupsGetDefault. If there are no default printers set,
120 check if there are installed printers, and use that.
121 Hopefully fixes #79835
123 2006-12-01 Andreia Gaita <avidigal@novell.com>
125 * PrintingServicesUnix: check return value from cupsGetDefault.
126 Hopefully fixes #79835
128 2006-12-01 Jordi Mas i Hernandez <jordimash@gmail.com>
130 * PrintingServicesWin32.cs: Fixes paper sizes reading. The POINT
131 structure is 8 bytes long not 4. This fixes margins calculations
132 (based on the paper size) that were badly broken.
134 2006-11-28 Andreia Gaita <avidigal@novell.com>
137 - internal member name changes to help
138 out with intelisense.
139 - Use internal members directly instead of using
140 corresponding properties so that exceptions are not thrown
141 * PrintingServicesWin32:
142 - Only return DefaultPrinter if it is actually valid. This
143 is because Win32GetDefaultPrinter returns a printer name
144 even if PrintSpooler is stopped (which should behave the
145 same way as if there are no printers installed)
146 - Do not try to allocate if EnumPrinters returns 0
148 2006-11-25 Jordi Mas i Hernandez <jordimash@gmail.com>
150 * PrintingServicesUnix.cs: Implements GetPrintDialogInfo
152 2006-11-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
154 Initial support for PageSettings (color, copies, collate,
157 * StandardPrintController.cs: Pass PrintDocument.PageSettings to
158 create the Graphics object (althought PageSettings
159 contains a PrinterSettings and vice versa, PrintDocument
160 can contain non-related PrinterSettings and PageSettings objects).
162 * PrintingServices.cs: Likewise.
163 * PrintingServicesWin32.cs: Likewise.
164 * PrintingServicesUnix.cs: Likewise. Also use cupsParseOptions
165 to pass printing options when calling cupsPrintFile. Use "Custom"
166 as name for custom pages without associated name (Laxmark printers
167 have this problem, causing a nullref exc). Add GetPaperKind () method
168 to retrieve and set the right PaperKind value for PaperSize, instead
169 of using PaperKind.Custom for all page sizes. Finally save
170 PageSettings in DOCINFO to use it later.
172 * PrintDocument.cs: Clone PrinterSettings.PageSettings
173 instead of creating a new one (this avoid creating an additional
174 PrinterSettings instance).
176 2006-11-17 Andreia Gaita <avidigal@novell.com>
178 * PrintingServicesWin32.cs: fix another dumb typo -
179 check proper return value from printer validity call
181 2006-11-16 Chris Toshok <toshok@ximian.com>
183 * PreviewPrintController.cs: fix typo - don't throw
184 InvalidPrinterException when it wasn't supposed to be.
186 2006-11-16 Carlos Alberto Cortez <calberto.cortez@gmail.com>
188 * PrintDocument.cs: Use QueryPageSettingsEventArgs.PageSettings
189 in PrintPageEventArgs, instead of using the default one (mimic
192 * PageSettings.cs: Implement Clone the right way (intead of using
193 the default page settings).
195 2006-11-14 Andreia Gaita <avidigal@novell.com>
196 Fixes #79835, implements PrinterSettings.IsValid, throws proper
197 InvalidPrinterException with differentiated messages.
199 * PrintingServices.cs: Declares IsPrinterValid to enable easy checking
200 if printer name is a valid printer
202 * PrintingServicesWin32.cs: Implements IsPrinterValid, caches
203 last assigned printer name and if it is valid to speed up next calls.
205 * PrintingServicesUnix.cs: Implements IsPrinterValid, caches
206 last assigned printer name and if it is valid to speed up next calls.
209 - throw InvalidPrinterException in the properties,
210 according to the docs: Color, Landscape, PaperSize, PaperSource,
212 - change the private fields above to internal, so that in the
213 constructor we can access them without triggering the exceptions
214 if there are no printers installed
216 * PrinterSettings.cs: Implement IsValid to call IsPrinterValid
219 * PreviewPrintController.cs: throw InvalidPrinterException on
220 StartPrint() if there's no valid printer configured
222 * InvalidPrinterException.cs: New private GetMessage() to customize
223 printer error message, used by constructor
225 2006-09-27 Jordi Mas i Hernandez <jordimash@gmail.com>
227 * PrintingServicesUnix.cs: Implements LoadPrinterPaperSources member,
228 simplifies GetPaperSizeName and loads paper source and size defaults
230 2006-09-27 Jordi Mas i Hernandez <jordimash@gmail.com>
232 * PrintingServices.cs: Add LoadPrinterPaperSources member
234 * PrintingServicesWin32.cs: Implements LoadPrinterPaperSources and
235 reads the default paper source and size.
237 * PrintingServicesUnix.cs: Add stub LoadPrinterPaperSources member
239 * PrinterSettings.cs: Implements PaperSourceCollection property and
240 makes default paper source and size from the system.
242 2006-08-02 Chris Toshok <toshok@ximian.com>
244 * PreviewPrintController.cs: scale the Graphics context we pass
245 back from OnStartPage such that the preview looks the way the
248 2006-07-28 Carlos Alberto Cortez <calberto.cortez@gmail.com>
250 * PrintDocument.cs: When null is passed to PrinterSettings,
251 it should be set to a new PrinterSettings instance, and should never
254 * PrinterSettings.cs: Default value for Copies should be 1. Also
255 add a space in the ToString method, to correctly show the printer
258 2006-07-26 Chris Toshok <toshok@ximian.com>
260 * PrinterSettings.cs: expose PrintFileName in the 1.1 case as an
261 internal property, so we can get at it from MWF.
263 * PrintingServicesUnix.cs: handle print to file, and also remove
264 the temp file after sending the data to the printer. fix some
265 dllimports to match the rest of system.drawing.
267 * PreviewPrintController.cs: implement this (warning, it'll eat
268 all your memory until we get a real Metafile implementation, as
269 we're storing bitmaps).
271 * PrintDocument.cs: shift the graphics context stuff around a bit
272 in Print(), so that the events after OnStartPrint are passed the
273 graphics context the controller created there, and we use the
274 return value of OnStartPage to do all drawing.
276 2006-05-20 Jordi Mas i Hernandez <jordimash@gmail.com>
278 * PrintingServices.cs: GetPrintDialogInfo definition
279 * PrintingServicesWin32.cs GetPrintDialogInfo implementation
280 * PrintingServicesUnix.cs: GetPrintDialogInfo stub
282 2006-04-14 Jordi Mas i Hernandez <jordimash@gmail.com>
284 * PrintingServicesUnix.cs: Replace cupsGetPrinters deprecated API call
286 2006-04-13 Jordi Mas i Hernandez <jordimash@gmail.com>
288 * PrintingServicesUnix.cs: Checks if cups is installed
289 * PrinterSettings.cs: PrintToFile property and ToString method
291 2006-04-28 Sebastien Pouliot <sebastien@ximian.com>
293 * PrintController.cs: corcompare fix. No public ctor in 2.0.
294 * PrinterSettings.cs: corcompare fix. Clone method isn't virtual.
296 2006-03-21 Sebastien Pouliot <sebastien@ximian.com>
298 * PrintingServicesUnix.cs: cupsGetPrinters(char***) requires to free
299 each individual string and (finally) the list. Note that this call is
302 2006-03-13 Peter Dennis Bartok <pbartok@novell.com>
304 * PrintingServicesUnix.cs: Handle not having a printer
306 2006-02-09 Peter Dennis Bartok <pbartok@novell.com>
308 * PrintingServicesWin32.cs: Simplyfied the code, removing the need
309 for pointer calculations (part of 64bit cleanup)
311 2006-01-27 Sebastien Pouliot <sebastien@ximian.com>
313 * PrintingServicesWin32.cs: Ensure Marshal.FreeHGlobal is called for
314 all unmanaged memory allocated with AllocHGlobal.
316 2006-01-15 Jordi Mas i Hernandez <jordimash@gmail.com>
318 * PrintingServicesUnix.cs: Allow setting the dpy's for the surface
320 2005-12-22 Jordi Mas i Hernandez <jordimash@gmail.com>
322 * PrintingServices.cs: Printing services abstration class
323 * PrintingServicesWin32.cs: Win32 printer driver
324 * PrintingServicesUnix.cs: Unix printer driver
325 * Margins.cs: Fixes exceptions error messages
326 * PrinterResolution.cs: Fixes
327 * PrintEventArgs.cs: New internal method
328 * PrintPageEventArgs.cs: New internal method
329 * StandardPrintController.cs: Fixes
330 * PrinterUnitConvert.cs: Fixes conversion errors
331 * PrintDocument.cs: Fixes to make it print
332 * PageSettings.cs: Take margains into account
333 * PrintController.cs: Fixes
334 * PaperSize.cs: Method to set paper Kind
335 * PrinterSettings.cs: Implements settings and fixes
338 2005-12-07 Jordi Mas i Hernandez <jordimash@gmail.com>
340 * PrinterResolutionKind.cs: Fixes signature for .Net 2.0
341 * PaperKind.cs: Fixes signature for .Net 2.0
342 * PaperSource.cs: Fixes signature for .Net 2.0
343 * Margins.cs: Fixes signature for .Net 2.0
344 * PrinterResolution.cs: Fixes signature for .Net 2.0
345 * PrintEventArgs.cs: Fixes signature for .Net 2.0
346 * PrintAction.cs: New enum in .Net 2.0
347 * PageSettings.cs: Fixes signature for .Net 2.0
348 * PaperSourceKind.cs: Fixes signature for .Net 2.0
349 * PrintController.cs: Fixes signature for .Net 2.0
350 * Duplex.cs: Fixes signature for .Net 2.0
351 * PaperSize.cs: Fixes signature for .Net 2.0
352 * PreviewPrintController.cs: Fixes signature for .Net 2.0
353 * PrinterSettings.cs: Fixes signature for .Net 2.0
354 * PrintRange.cs: Fixes signature for .Net 2.0
356 2005-09-16 Sebastien Pouliot <sebastien@ximian.com>
358 * InvalidPrinterException.cs: Removed NotImplementedException (not
359 required) and added a demand for SerializationFormatter on the
360 GetObjectData method.
361 * PrintingPermission.cs: Throw ArgumentException if the class or
362 version attributes are missing in the supplied XML (only in 1.x).
364 2005-03-23 Jordi Mas i Hernandez <jordi@ximian.com>
365 * PaperKind.cs: fixes wrong enum values
367 2005-01-27 Lluis Sanchez Gual <lluis@novell.com>
369 * MarginsConverter.cs: Implemented support for InstanceDescriptor.