/// <summary> /// Handles the ImageCollection.LayoutSettingsRequest event. /// </summary> private void ImageCollection_LayoutSettingsRequest(object sender, DocumentLayoutSettingsRequestEventArgs e) { if (LayoutSettings != null && CodecName == e.Codec.Name) { // update document layout settings LayoutSettings.CopyTo(e.LayoutSettings); } }
/// <summary> /// Handles the LayoutSettingsRequest event of the ChartImages. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DocumentLayoutSettingsRequestEventArgs"/> instance containing the event data.</param> private static void ChartImages_LayoutSettingsRequest(object sender, DocumentLayoutSettingsRequestEventArgs e) { // specify that only first page must be layouted e.LayoutSettings.PageCount = 1; // specify that relative size of graphics object must be used e.LayoutSettings.UseGraphicObjectReleativeSize = true; // set the page size to 70x70mm e.LayoutSettings.PageLayoutSettings = new PageLayoutSettings(ImageSize.FromMillimeters(70, 70, new Resolution(96))); }