Skip to content

Commit

Permalink
Updated sources
Browse files Browse the repository at this point in the history
  • Loading branch information
product-team committed Aug 4, 2021
1 parent e6bede7 commit 8fc2cc0
Show file tree
Hide file tree
Showing 15 changed files with 369 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ public void TestCreateViewReturnsMissingFileInfo()
var request = new CreateViewRequest(viewOptions);

// Act & Assert
Assert.Throws<ApiException>(() => {
var ex = Assert.Throws<ApiException>(() => {
ViewApi.CreateView(request);
});
Assert.AreEqual("Parameter 'FileInfo' is not specified.", ex.Message);
}

[Test]
Expand All @@ -59,9 +60,10 @@ public void TestCreateViewReturnsFileNotFound()
var request = new CreateViewRequest(viewOptions);

// Act & Assert
Assert.Throws<ApiException>(() => {
var ex = Assert.Throws<ApiException>(() => {
ViewApi.CreateView(request);
});
Assert.AreEqual("Can't find file located at 'some-folder/NotExist.docx'.", ex.Message);
}

[Test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ public void TestGetInfoReturnsMissingFileInfo()
var request = new GetInfoRequest(viewOptions);

// Act & Assert
Assert.Throws<ApiException>(() => {
var ex = Assert.Throws<ApiException>(() => {
InfoApi.GetInfo(request);
});

Assert.AreEqual("Parameter 'FileInfo' is not specified.", ex.Message);
}

[Test]
Expand All @@ -58,9 +60,10 @@ public void TestGetInfoReturnsFileNotFound()
var request = new GetInfoRequest(viewOptions);

// Act & Assert
Assert.Throws<ApiException>(() => {
var ex = Assert.Throws<ApiException>(() => {
InfoApi.GetInfo(request);
});
Assert.AreEqual("Can't find file located at 'some-folder/NotExist.docx'.", ex.Message);
}

[Test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net20</TargetFrameworks>
<AssemblyVersion>21.3.0.0</AssemblyVersion>
<FileVersion>21.3.0.0</FileVersion>
<Version>21.3</Version>
<AssemblyVersion>21.8.0.0</AssemblyVersion>
<FileVersion>21.8.0.0</FileVersion>
<Version>21.8</Version>
<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
<Company>GroupDocs</Company>
<Authors>GroupDocs Product Team</Authors>
Expand Down
12 changes: 12 additions & 0 deletions src/GroupDocs.Viewer.Cloud.Sdk/Model/ArchiveOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ public class ArchiveOptions
/// </summary>
public string Folder { get; set; }

/// <summary>
/// The filename to display in the header. By default the name of the source file is displayed.
/// </summary>
public string FileName { get; set; }

/// <summary>
/// Number of records per page (for rendering to HTML only)
/// </summary>
public int? ItemsPerPage { get; set; }

/// <summary>
/// Get the string presentation of the object
/// </summary>
Expand All @@ -52,6 +62,8 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class ArchiveOptions {\n");
sb.Append(" Folder: ").Append(this.Folder).Append("\n");
sb.Append(" FileName: ").Append(this.FileName).Append("\n");
sb.Append(" ItemsPerPage: ").Append(this.ItemsPerPage).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
12 changes: 12 additions & 0 deletions src/GroupDocs.Viewer.Cloud.Sdk/Model/EmailOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ public enum PageSizeEnum
/// </summary>
public List<FieldLabel> FieldLabels { get; set; }

/// <summary>
/// Time Format (can be include TimeZone) for example: 'MM d yyyy HH:mm tt', if not set - current system format is used
/// </summary>
public string DateTimeFormat { get; set; }

/// <summary>
/// Message time zone offset. Format should be compatible with .net TimeSpan
/// </summary>
public string TimeZoneOffset { get; set; }

/// <summary>
/// Get the string presentation of the object
/// </summary>
Expand All @@ -106,6 +116,8 @@ public override string ToString()
sb.Append("class EmailOptions {\n");
sb.Append(" PageSize: ").Append(this.PageSize).Append("\n");
sb.Append(" FieldLabels: ").Append(this.FieldLabels).Append("\n");
sb.Append(" DateTimeFormat: ").Append(this.DateTimeFormat).Append("\n");
sb.Append(" TimeZoneOffset: ").Append(this.TimeZoneOffset).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
36 changes: 36 additions & 0 deletions src/GroupDocs.Viewer.Cloud.Sdk/Model/HtmlOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,36 @@ public class HtmlOptions : RenderOptions
/// </summary>
public List<string> FontsToExclude { get; set; }

/// <summary>
/// Indicates whether to optimize output HTML for printing.
/// </summary>
public bool? ForPrinting { get; set; }

/// <summary>
/// The height of an output image in pixels. (When converting single image to HTML only)
/// </summary>
public int? ImageHeight { get; set; }

/// <summary>
/// The width of the output image in pixels. (When converting single image to HTML only)
/// </summary>
public int? ImageWidth { get; set; }

/// <summary>
/// Max height of an output image in pixels. (When converting single image to HTML only)
/// </summary>
public int? ImageMaxHeight { get; set; }

/// <summary>
/// Max width of an output image in pixels. (When converting single image to HTML only)
/// </summary>
public int? ImageMaxWidth { get; set; }

/// <summary>
/// Enables HTML content will be rendered to single page
/// </summary>
public bool? RenderToSinglePage { get; set; }

/// <summary>
/// Get the string presentation of the object
/// </summary>
Expand All @@ -82,6 +112,12 @@ public override string ToString()
sb.Append(" Minify: ").Append(this.Minify).Append("\n");
sb.Append(" ExcludeFonts: ").Append(this.ExcludeFonts).Append("\n");
sb.Append(" FontsToExclude: ").Append(this.FontsToExclude).Append("\n");
sb.Append(" ForPrinting: ").Append(this.ForPrinting).Append("\n");
sb.Append(" ImageHeight: ").Append(this.ImageHeight).Append("\n");
sb.Append(" ImageWidth: ").Append(this.ImageWidth).Append("\n");
sb.Append(" ImageMaxHeight: ").Append(this.ImageMaxHeight).Append("\n");
sb.Append(" ImageMaxWidth: ").Append(this.ImageMaxWidth).Append("\n");
sb.Append(" RenderToSinglePage: ").Append(this.RenderToSinglePage).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
12 changes: 12 additions & 0 deletions src/GroupDocs.Viewer.Cloud.Sdk/Model/ImageOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ public class ImageOptions : RenderOptions
/// </summary>
public int? JpegQuality { get; set; }

/// <summary>
/// Max width of an output image in pixels
/// </summary>
public int? MaxWidth { get; set; }

/// <summary>
/// Max height of an output image in pixels
/// </summary>
public int? MaxHeight { get; set; }

/// <summary>
/// Get the string presentation of the object
/// </summary>
Expand All @@ -70,6 +80,8 @@ public override string ToString()
sb.Append(" Height: ").Append(this.Height).Append("\n");
sb.Append(" ExtractText: ").Append(this.ExtractText).Append("\n");
sb.Append(" JpegQuality: ").Append(this.JpegQuality).Append("\n");
sb.Append(" MaxWidth: ").Append(this.MaxWidth).Append("\n");
sb.Append(" MaxHeight: ").Append(this.MaxHeight).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
71 changes: 71 additions & 0 deletions src/GroupDocs.Viewer.Cloud.Sdk/Model/MailStorageOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright company="Aspose Pty Ltd" file="MailStorageOptions.cs">
// Copyright (c) 2003-2021 Aspose Pty Ltd
// </copyright>
// <summary>
// 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.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace GroupDocs.Viewer.Cloud.Sdk.Model
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

/// <summary>
/// Provides options for rendering Mail storage (Lotus Notes, MBox) data files.
/// </summary>
public class MailStorageOptions
{
/// <summary>
/// The keywords used to filter messages.
/// </summary>
public string TextFilter { get; set; }

/// <summary>
/// The email-address used to filter messages by sender or recipient.
/// </summary>
public string AddressFilter { get; set; }

/// <summary>
/// The maximum number of messages or items for render. Default value is 0 - all messages will be rendered
/// </summary>
public int? MaxItems { get; set; }

/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class MailStorageOptions {\n");
sb.Append(" TextFilter: ").Append(this.TextFilter).Append("\n");
sb.Append(" AddressFilter: ").Append(this.AddressFilter).Append("\n");
sb.Append(" MaxItems: ").Append(this.MaxItems).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
}
}
6 changes: 6 additions & 0 deletions src/GroupDocs.Viewer.Cloud.Sdk/Model/PdfDocumentOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ public enum ImageQualityEnum
/// </summary>
public bool? RenderOriginalPageSize { get; set; }

/// <summary>
/// When this option is set to true, the text is rendered as an image in the output HTML. Enable this option to make text unselectable or to fix characters rendering and make HTML look like PDF. The default value is false. This option is supported when rendering into HTML.
/// </summary>
public bool? RenderTextAsImage { get; set; }

/// <summary>
/// Get the string presentation of the object
/// </summary>
Expand All @@ -99,6 +104,7 @@ public override string ToString()
sb.Append(" EnableFontHinting: ").Append(this.EnableFontHinting).Append("\n");
sb.Append(" RenderOriginalPageSize: ").Append(this.RenderOriginalPageSize).Append("\n");
sb.Append(" ImageQuality: ").Append(this.ImageQuality).Append("\n");
sb.Append(" RenderTextAsImage: ").Append(this.RenderTextAsImage).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
24 changes: 24 additions & 0 deletions src/GroupDocs.Viewer.Cloud.Sdk/Model/PdfOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ public class PdfOptions : RenderOptions
/// </summary>
public List<string> Permissions { get; set; }

/// <summary>
/// Max width of an output image in pixels. (When converting single image to HTML only)
/// </summary>
public int? ImageMaxWidth { get; set; }

/// <summary>
/// Max height of an output image in pixels. (When converting single image to HTML only)
/// </summary>
public int? ImageMaxHeight { get; set; }

/// <summary>
/// The width of the output image in pixels. (When converting single image to HTML only)
/// </summary>
public int? ImageWidth { get; set; }

/// <summary>
/// The height of an output image in pixels. (When converting single image to HTML only)
/// </summary>
public int? ImageHeight { get; set; }

/// <summary>
/// Get the string presentation of the object
/// </summary>
Expand All @@ -70,6 +90,10 @@ public override string ToString()
sb.Append(" DocumentOpenPassword: ").Append(this.DocumentOpenPassword).Append("\n");
sb.Append(" PermissionsPassword: ").Append(this.PermissionsPassword).Append("\n");
sb.Append(" Permissions: ").Append(this.Permissions).Append("\n");
sb.Append(" ImageMaxWidth: ").Append(this.ImageMaxWidth).Append("\n");
sb.Append(" ImageMaxHeight: ").Append(this.ImageMaxHeight).Append("\n");
sb.Append(" ImageWidth: ").Append(this.ImageWidth).Append("\n");
sb.Append(" ImageHeight: ").Append(this.ImageHeight).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
18 changes: 18 additions & 0 deletions src/GroupDocs.Viewer.Cloud.Sdk/Model/RenderOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,21 @@ public class RenderOptions
/// </summary>
public ArchiveOptions ArchiveOptions { get; set; }

/// <summary>
/// Rendering options for Text source file formats
/// </summary>
public TextOptions TextOptions { get; set; }

/// <summary>
/// Rendering options for Mail storage (Lotus Notes, MBox) data files.
/// </summary>
public MailStorageOptions MailStorageOptions { get; set; }

/// <summary>
/// Rendering options for Visio source file formats
/// </summary>
public VisioRenderingOptions VisioRenderingOptions { get; set; }

/// <summary>
/// Get the string presentation of the object
/// </summary>
Expand All @@ -148,6 +163,9 @@ public override string ToString()
sb.Append(" WordProcessingOptions: ").Append(this.WordProcessingOptions).Append("\n");
sb.Append(" OutlookOptions: ").Append(this.OutlookOptions).Append("\n");
sb.Append(" ArchiveOptions: ").Append(this.ArchiveOptions).Append("\n");
sb.Append(" TextOptions: ").Append(this.TextOptions).Append("\n");
sb.Append(" MailStorageOptions: ").Append(this.MailStorageOptions).Append("\n");
sb.Append(" VisioRenderingOptions: ").Append(this.VisioRenderingOptions).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
12 changes: 12 additions & 0 deletions src/GroupDocs.Viewer.Cloud.Sdk/Model/SpreadsheetOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ public enum TextOverflowModeEnum
/// </summary>
public int? CountRowsPerPage { get; set; }

/// <summary>
/// The columns count to include into each page when splitting worksheet into pages.
/// </summary>
public int? CountColumnsPerPage { get; set; }

/// <summary>
/// Indicates whether to render grid lines
/// </summary>
Expand All @@ -106,6 +111,11 @@ public enum TextOverflowModeEnum
/// </summary>
public bool? RenderHiddenColumns { get; set; }

/// <summary>
/// Enables headings rendering.
/// </summary>
public bool? RenderHeadings { get; set; }

/// <summary>
/// Enables rendering worksheet(s) sections which is defined as print area. Renders each print area in a worksheet as a separate page.
/// </summary>
Expand All @@ -121,11 +131,13 @@ public override string ToString()
sb.Append("class SpreadsheetOptions {\n");
sb.Append(" PaginateSheets: ").Append(this.PaginateSheets).Append("\n");
sb.Append(" CountRowsPerPage: ").Append(this.CountRowsPerPage).Append("\n");
sb.Append(" CountColumnsPerPage: ").Append(this.CountColumnsPerPage).Append("\n");
sb.Append(" RenderGridLines: ").Append(this.RenderGridLines).Append("\n");
sb.Append(" RenderEmptyRows: ").Append(this.RenderEmptyRows).Append("\n");
sb.Append(" RenderEmptyColumns: ").Append(this.RenderEmptyColumns).Append("\n");
sb.Append(" RenderHiddenRows: ").Append(this.RenderHiddenRows).Append("\n");
sb.Append(" RenderHiddenColumns: ").Append(this.RenderHiddenColumns).Append("\n");
sb.Append(" RenderHeadings: ").Append(this.RenderHeadings).Append("\n");
sb.Append(" RenderPrintAreaOnly: ").Append(this.RenderPrintAreaOnly).Append("\n");
sb.Append(" TextOverflowMode: ").Append(this.TextOverflowMode).Append("\n");
sb.Append("}\n");
Expand Down
Loading

0 comments on commit 8fc2cc0

Please sign in to comment.