All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.drawing.printing.PrinterSettings Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2024 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector v. 1.15.0.0
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system.drawing.printing;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.drawing.Image;
import system.drawing.imaging.ImageFormat;
import system.drawing.Graphics;
import system.drawing.printing.PageSettings;
import system.drawing.printing.Duplex;
import system.drawing.printing.PrintRange;


/**
 * The base .NET class managing System.Drawing.Printing.PrinterSettings, System.Drawing.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51.
 * 

* * .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Drawing.Printing.PrinterSettings *

* * Powered by JCOBridge: more info at https://www.jcobridge.com * * @author MASES s.r.l https://masesgroup.com * @version 1.15.0.0 */ public class PrinterSettings extends NetObject { /** * Fully assembly qualified name: System.Drawing.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 */ public static final String assemblyFullName = "System.Drawing.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"; /** * Assembly name: System.Drawing.Common */ public static final String assemblyShortName = "System.Drawing.Common"; /** * Qualified class name: System.Drawing.Printing.PrinterSettings */ public static final String className = "System.Drawing.Printing.PrinterSettings"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public PrinterSettings(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link PrinterSettings}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link PrinterSettings} instance * @throws java.lang.Throwable in case of error during cast operation */ public static PrinterSettings cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new PrinterSettings(from.getJCOInstance()); } // Constructors section public PrinterSettings() throws Throwable, system.ArgumentException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.FormatException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Methods section public boolean IsDirectPrintingSupported(Image image) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.NotSupportedException, system.IndexOutOfRangeException, system.FormatException, system.componentmodel.Win32Exception, system.drawing.printing.InvalidPrinterException, system.ArgumentOutOfRangeException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("IsDirectPrintingSupported", image == null ? null : image.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean IsDirectPrintingSupported(ImageFormat imageFormat) throws Throwable, system.ArgumentException, system.componentmodel.Win32Exception, system.InvalidOperationException, system.PlatformNotSupportedException, system.drawing.printing.InvalidPrinterException, system.ArgumentNullException, system.ArrayTypeMismatchException, system.NotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("IsDirectPrintingSupported", imageFormat == null ? null : imageFormat.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Graphics CreateMeasurementGraphics() throws Throwable, system.componentmodel.Win32Exception, system.InvalidOperationException, system.PlatformNotSupportedException, system.drawing.printing.InvalidPrinterException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.ArgumentException, system.NotSupportedException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objCreateMeasurementGraphics = (JCObject)classInstance.Invoke("CreateMeasurementGraphics"); return new Graphics(objCreateMeasurementGraphics); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Graphics CreateMeasurementGraphics(boolean honorOriginAtMargins) throws Throwable, system.componentmodel.Win32Exception, system.InvalidOperationException, system.drawing.printing.InvalidPrinterException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.PlatformNotSupportedException, system.ArgumentException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objCreateMeasurementGraphics = (JCObject)classInstance.Invoke("CreateMeasurementGraphics", honorOriginAtMargins); return new Graphics(objCreateMeasurementGraphics); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Graphics CreateMeasurementGraphics(PageSettings pageSettings, boolean honorOriginAtMargins) throws Throwable, system.componentmodel.Win32Exception, system.InvalidOperationException, system.drawing.printing.InvalidPrinterException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.PlatformNotSupportedException, system.ArgumentException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objCreateMeasurementGraphics = (JCObject)classInstance.Invoke("CreateMeasurementGraphics", pageSettings == null ? null : pageSettings.getJCOInstance(), honorOriginAtMargins); return new Graphics(objCreateMeasurementGraphics); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Graphics CreateMeasurementGraphics(PageSettings pageSettings) throws Throwable, system.ArgumentException, system.componentmodel.Win32Exception, system.InvalidOperationException, system.PlatformNotSupportedException, system.drawing.printing.InvalidPrinterException, system.ArgumentNullException, system.ArrayTypeMismatchException, system.NotSupportedException, system.IndexOutOfRangeException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objCreateMeasurementGraphics = (JCObject)classInstance.Invoke("CreateMeasurementGraphics", pageSettings == null ? null : pageSettings.getJCOInstance()); return new Graphics(objCreateMeasurementGraphics); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject Clone() throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objClone = (JCObject)classInstance.Invoke("Clone"); return new NetObject(objClone); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Properties section public boolean getCanDuplex() throws Throwable, system.ArgumentException, system.componentmodel.Win32Exception, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("CanDuplex"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getCollate() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.NotSupportedException, system.InvalidOperationException, system.ObjectDisposedException, system.InvalidCastException, system.componentmodel.Win32Exception, system.drawing.printing.InvalidPrinterException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("Collate"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setCollate(boolean Collate) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Collate", Collate); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getIsDefaultPrinter() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.componentmodel.Win32Exception, system.NotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("IsDefaultPrinter"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getIsPlotter() throws Throwable, system.componentmodel.Win32Exception, system.InvalidOperationException, system.PlatformNotSupportedException, system.drawing.printing.InvalidPrinterException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.ArgumentException, system.NotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("IsPlotter"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getIsValid() throws Throwable, system.ArgumentException, system.componentmodel.Win32Exception, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("IsValid"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getPrintToFile() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("PrintToFile"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setPrintToFile(boolean PrintToFile) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("PrintToFile", PrintToFile); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getSupportsColor() throws Throwable, system.ArgumentException, system.componentmodel.Win32Exception, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("SupportsColor"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public short getCopies() throws Throwable, system.componentmodel.Win32Exception, system.InvalidOperationException, system.PlatformNotSupportedException, system.drawing.printing.InvalidPrinterException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.ArgumentException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (short)classInstance.Get("Copies"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setCopies(short Copies) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Copies", Copies); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getFromPage() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("FromPage"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setFromPage(int FromPage) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("FromPage", FromPage); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getLandscapeAngle() throws Throwable, system.ArgumentException, system.componentmodel.Win32Exception, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("LandscapeAngle"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getMaximumCopies() throws Throwable, system.ArgumentException, system.componentmodel.Win32Exception, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("MaximumCopies"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getMaximumPage() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("MaximumPage"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setMaximumPage(int MaximumPage) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("MaximumPage", MaximumPage); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getMinimumPage() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("MinimumPage"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setMinimumPage(int MinimumPage) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("MinimumPage", MinimumPage); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getToPage() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("ToPage"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setToPage(int ToPage) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("ToPage", ToPage); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Duplex getDuplex() throws Throwable, system.componentmodel.Win32Exception, system.InvalidOperationException, system.PlatformNotSupportedException, system.drawing.printing.InvalidPrinterException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.ArgumentException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Duplex"); return new Duplex(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setDuplex(Duplex Duplex) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.ArrayTypeMismatchException, system.InvalidOperationException, system.NotSupportedException, system.IndexOutOfRangeException, system.FormatException, system.componentmodel.InvalidEnumArgumentException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Duplex", Duplex == null ? null : Duplex.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public PageSettings getDefaultPageSettings() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("DefaultPageSettings"); return new PageSettings(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public PrintRange getPrintRange() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("PrintRange"); return new PrintRange(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setPrintRange(PrintRange PrintRange) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException, system.FormatException, system.componentmodel.InvalidEnumArgumentException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("PrintRange", PrintRange == null ? null : PrintRange.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getPrinterName() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.componentmodel.Win32Exception { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("PrinterName"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setPrinterName(java.lang.String PrinterName) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("PrinterName", PrinterName); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getPrintFileName() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("PrintFileName"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setPrintFileName(java.lang.String PrintFileName) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("PrintFileName", PrintFileName); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy