- Introduction
- What's New?
- Features
- Upgrading the Design Editor
- Breaking Changes in 6.0
- Getting Started
- Integration with E-commerce
- Integration with Remote Asset Sources
- Printable Files and Proof Images
- Configuring Products
- Creating Product Templates
- User Interface
- Configuration Files
- APIs
- IFrame API
- Web API
- Design Atoms Framework
- What's New?
- Design Atoms Framework Overview
- Creating Applications with Design Atoms Framework
- Working with the Object Model
- Groups of Design Elements
- Using Dependency Injection
- Loading Templates
- Saving Products
- Rendering Products
- Reference
- Aurigma.DesignAtoms.Common Namespace
- Aurigma.DesignAtoms.Common.Math Namespace
- Aurigma.DesignAtoms.Configuration Namespace
- Aurigma.DesignAtoms.Configuration.RenderingConfig Namespace
- Aurigma.DesignAtoms.Convert Namespace
- Aurigma.DesignAtoms.Licensing Namespace
- Aurigma.DesignAtoms.Model Namespace
- Aurigma.DesignAtoms.Model.CustomData Namespace
- Aurigma.DesignAtoms.Model.Items Namespace
- Aurigma.DesignAtoms.Rendering Namespace
- CanvasBuilder Class
- CanvasBuilderSettings Class
- CanvasRenderer Class
- ICanvasBuilder Interface
- ICanvasRenderer Interface
- IProductRenderer Interface
- ProductRenderer Class
- ProductRenderer Members
- ProductRenderer Constructor
- ProductRenderer Fields
- ProductRenderer Methods
- GetWatermarkStorageId Method
- RenderHiRes Method
- RenderHiResBitmap Method
- RenderHiResOutput Method
- RenderProof Method
- RenderProof Method (Surface, RenderingConfig, Nullable(Size), Nullable())
- RenderProof Method (Stream, Surface, RenderingConfig, Nullable(Size), Nullable())
- RenderProof Method (Surface, SurfaceData, RenderingConfig, Nullable(Size), Nullable())
- RenderProof Method (Func(RenderingContext, Stream), Surface, SurfaceData, RenderingConfig, Nullable(Size), Nullable())
- RenderProofImage Method
- RenderThumbnail Method
- RenderWatermark Method
- RenderWatermarkToStorageId Method
- RenderingContext Class
- RenderingType Enumeration
- WorkspaceTransformParams Class
- Aurigma.DesignAtoms.Serialization Namespace
- Aurigma.DesignAtoms.Serialization.Json.Product Namespace
- UI Framework
- Dynamic Image API
- Add-ons
- System Requirements
- Troubleshooting
- Migrating Your Applications
- Licensing
- Copyright Notices
You’re viewing outdated documentation. View the latest Customer’s Canvas On-Premises documentation.
RenderProof Method (Stream, Surface, RenderingConfig, Nullable(Size), Nullable())
Applies to: Customer's Canvas On-Premises; Design Atoms .NET 6.0.0, 6.x (may differ) · Archived documentation
Renders a Surface to a Stream.
Namespace:
Aurigma.DesignAtoms.Rendering
Assembly:
Aurigma.DesignAtoms (in Aurigma.DesignAtoms.dll)
Syntax
C#
public void RenderProof(
Stream stream,
Surface surface,
RenderingConfig renderingConfig,
Nullable<Size> maxSize,
Nullable<ResizeMode> resizeMode
)
Parameters
- stream
-
Type: System.IO.Stream
An output Stream.
- surface
-
Type: Aurigma.DesignAtoms.Model.Surface
A Surface to render.
- renderingConfig
-
Type: Aurigma.DesignAtoms.Configuration.RenderingConfig.RenderingConfig
Rendering properties. You can passnullto use the dafault configuration.
- maxSize
-
Type: System.Nullable<Size>
The width and height of the rendered proof image, in pixels. By default, proof images are 500 x 500 pixels.
- resizeMode
-
Type: System.Nullable<ResizeMode>
Defines how the proof image should appear in the specified bounds. For the values, you can refer to the ResizeMode enumeration.
Examples
C#
using Aurigma.GraphicsMill.Codecs;
using Aurigma.DesignAtoms.Configuration.RenderingConfig;
using Aurigma.DesignAtoms.Rendering;
// Create the output file.
using (var fileStream = File.Create("thumbnail.jpg"))
{
// Read the default rendering config.
var config = RenderingConfig.GetDefault();
// Set the JPEG image format.
config.DefaultProofRendering.FileFormat = FileFormat.Jpeg;
// Set the new image size.
var maxSize = new Size(300, 300);
// Instantiate IProductRenderer and render the first product page.
var renderer = Injector.Instance.Resolve<IProductRenderer>();
renderer.RenderProof(fileStream, product.Surfaces.First(), config, maxSize);
}