There is already a test case for that (PrintingServicesUnixTest.cs,
Bug602934_PrinterSettingsReturnActualValues) which fails when user
configured options are different from PPD settings. Patch also makes
this test not to fail if "Resolution" option is not present in CUPS
options.
*Update: removed leftover debug Console.WriteLine from patch
* PrintingServicesUnix.cs: Fix potential crash on 64bit OS. Gendarme
rule for checking IntPtr has been updated to cover this case as well
svn path=/trunk/mcs/; revision=117611
* PreviewPrintController.cs: Reduce bitmap size and avoid scaling the
print preview (fix bug #80765). Patch from Vladimir Dimitrov.
* PrintingServicesUnix.cs: Reorder calculation to avoid loss of
precision in integer division. Use printer resolution for Cairo
fallback. Patch from Vladimir Dimitrov.
svn path=/trunk/mcs/; revision=77837
* PrintingServicesUnix.cs: add checks and try blocks to make sure
things don't blow up if we try to double free anything (not that
we're trying to do anything like that :p )
svn path=/trunk/mcs/; revision=73264
* PrintingServicesUnix.cs: Fix leak caused by not calling cupsFreeDests
on certain codepaths. Fix return value of cupsFreeDests to void.
svn path=/trunk/mcs/; revision=73208
Redesign how and when cups gets called to minimize
p/invokes, implements caching of printers and printer
settings as per calberto's patch - #79822, plotter detection,
duplex, fixes for image disposing, code modularization,
misc. fixes.
svn path=/trunk/mcs/; revision=73048
* PrintingServicesUnix.cs: Ensure we free the original pointer in
GetAlternativeDefaultPrinter (not the one used for iteration).
svn path=/trunk/mcs/; revision=72542
* PrintingServicesUnix.cs: Add "landscape" option
when using PaperSettings.Landscape set to true. Also
swap the width and height for the postscript file.
svn path=/trunk/mcs/; revision=69014
* PrintingServicesUnix: *properly* check return value from
cupsGetDefault. If there are no default printers set,
check if there are installed printers, and use that.
Hopefully fixes#79835
svn path=/trunk/mcs/; revision=68872
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).
svn path=/trunk/mcs/; revision=68449
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-11-14 Andreia Gaita <[email protected]>
svn path=/trunk/mcs/; revision=67880
simplifies GetPaperSizeName and loads paper source and size defaults
2006-09-27 Jordi Mas i Hernandez <[email protected]>
svn path=/trunk/mcs/; revision=65976
* 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.
svn path=/trunk/mcs/; revision=65968
* 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.
svn path=/trunk/mcs/; revision=63020
* PrintingServicesUnix.cs: cupsGetPrinters(char***) requires to free
each individual string and (finally) the list. Note that this call is
deprecated.
svn path=/trunk/mcs/; revision=58270