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