diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 6d86ee80..99ac6436 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -12,7 +12,7 @@ body: attributes: label: PDFtoImage version description: Which version of PDFtoImage is affected? - value: 2.4.3 + value: 3.0.0 validations: required: true - type: dropdown diff --git a/.github/workflows/githubpages.yml b/.github/workflows/githubpages.yml index cbfabd73..14eb537b 100644 --- a/.github/workflows/githubpages.yml +++ b/.github/workflows/githubpages.yml @@ -42,7 +42,7 @@ jobs: - name: Restore run: dotnet restore src/WebConverter/WebConverter.csproj - name: Publish - run: dotnet publish src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml --no-restore + run: dotnet publish src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml -p:VersionSuffix=ci --no-restore - name: Create .nojekyll file run: touch src/WebConverter/bin/Release/net7.0/publish/wwwroot/.nojekyll - name: Update service-worker-assets.js hashes @@ -96,4 +96,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@main + uses: actions/deploy-pages@main \ No newline at end of file diff --git a/.github/workflows/githubpages_staging.yml b/.github/workflows/githubpages_staging.yml index 4578d997..14d83856 100644 --- a/.github/workflows/githubpages_staging.yml +++ b/.github/workflows/githubpages_staging.yml @@ -43,7 +43,7 @@ jobs: - name: Restore run: dotnet restore src/WebConverter/WebConverter.csproj - name: Publish - run: dotnet publish src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml --no-restore + run: dotnet publish src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml -p:VersionSuffix=ci --no-restore - name: Create .nojekyll file run: touch src/WebConverter/bin/Release/net7.0/publish/wwwroot/.nojekyll - name: Update service-worker-assets.js hashes @@ -99,4 +99,4 @@ jobs: id: deployment uses: actions/deploy-pages@main with: - preview: true + preview: true \ No newline at end of file diff --git a/src/Console/Console.csproj b/src/Console/Console.csproj index 575788df..5b52d119 100644 --- a/src/Console/Console.csproj +++ b/src/Console/Console.csproj @@ -7,7 +7,7 @@ PDFtoImage.Console PDFtoImage.Console PDFtoImage.Console.Program - 2.4.3 + 3.0.0 Debug;Release;ReleaseSigned diff --git a/src/Console/Program.cs b/src/Console/Program.cs index 1d72ba15..d6c816ef 100644 --- a/src/Console/Program.cs +++ b/src/Console/Program.cs @@ -4,6 +4,9 @@ namespace PDFtoImage.Console { +#if NET8_0_OR_GREATER +#pragma warning disable CA1510 // Use ArgumentNullException throw helper +#endif public static class Program { public static int Main(string[] args) diff --git a/src/FrameworkTests/AspNetCore/Program.cs b/src/FrameworkTests/AspNetCore/Program.cs index 3b1268bb..41582281 100644 --- a/src/FrameworkTests/AspNetCore/Program.cs +++ b/src/FrameworkTests/AspNetCore/Program.cs @@ -22,7 +22,9 @@ private static string GetOutput() { using var input = new FileStream(Path.Combine(_hostingEnvironment!.WebRootPath, "SocialPreview.pdf"), FileMode.Open, FileAccess.Read); +#pragma warning disable CA1416 // Validate platform compatibility using var bitmap = PDFtoImage.Conversion.ToImage(input); +#pragma warning restore CA1416 // Validate platform compatibility return $"SocialPreview.pdf size: {bitmap.Width}x{bitmap.Height}"; } diff --git a/src/FrameworkTests/MauiApp/MainPage.xaml.cs b/src/FrameworkTests/MauiApp/MainPage.xaml.cs index 6a6a6ef3..1009618a 100644 --- a/src/FrameworkTests/MauiApp/MainPage.xaml.cs +++ b/src/FrameworkTests/MauiApp/MainPage.xaml.cs @@ -15,7 +15,9 @@ private async void OnCounterClicked(object sender, EventArgs e) using var ms = new MemoryStream(); input.CopyTo(ms); +#pragma warning disable CA1416 // Validate platform compatibility using var bitmap = PDFtoImage.Conversion.ToImage(ms); +#pragma warning restore CA1416 // Validate platform compatibility OutputLabel.Text = $"SocialPreview.pdf size: {bitmap.Width}x{bitmap.Height}"; } diff --git a/src/FrameworkTests/MauiApp/Platforms/Android/MainApplication.cs b/src/FrameworkTests/MauiApp/Platforms/Android/MainApplication.cs index b33c9db5..6c2a7a80 100644 --- a/src/FrameworkTests/MauiApp/Platforms/Android/MainApplication.cs +++ b/src/FrameworkTests/MauiApp/Platforms/Android/MainApplication.cs @@ -4,13 +4,8 @@ namespace PDFtoImage.FrameworkTests.MauiApp { [Application] - public class MainApplication : MauiApplication + public class MainApplication(IntPtr handle, JniHandleOwnership ownership) : MauiApplication(handle, ownership) { - public MainApplication(IntPtr handle, JniHandleOwnership ownership) - : base(handle, ownership) - { - } - protected override Microsoft.Maui.Hosting.MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); } } \ No newline at end of file diff --git a/src/FrameworkTests/MonoAndroid/MonoAndroid.csproj b/src/FrameworkTests/MonoAndroid/MonoAndroid.csproj index 83e9c0cf..9d4b66f6 100644 --- a/src/FrameworkTests/MonoAndroid/MonoAndroid.csproj +++ b/src/FrameworkTests/MonoAndroid/MonoAndroid.csproj @@ -112,9 +112,9 @@ - - - + + + diff --git a/src/PDFtoImage/Conversion.cs b/src/PDFtoImage/Conversion.cs index 0e71f11b..92a93774 100644 --- a/src/PDFtoImage/Conversion.cs +++ b/src/PDFtoImage/Conversion.cs @@ -12,1253 +12,1337 @@ namespace PDFtoImage { - /// - /// Provides methods to render PDFs into images. - /// - public static class Conversion - { - #region SaveJpeg - /// - /// Renders a single page of a given PDF and saves it as a JPEG. - /// - /// The output image file path. - /// The PDF encoded as Base64. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. +#if NET8_0_OR_GREATER +#pragma warning disable CA1510 // Use ArgumentNullException throw helper +#endif + /// + /// Provides methods to render PDFs into images. + /// + public static class Conversion + { + #region SaveJpeg + /// + /// Renders a single page of a given PDF and saves it as a JPEG. + /// + /// The output image file path. + /// The PDF encoded as Base64. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveJpeg(string imageFilename, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageFilename, SKEncodedImageFormat.Jpeg, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a JPEG. - /// - /// The output image stream. - /// The PDF encoded as Base64. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveJpeg(string imageFilename, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageFilename, SKEncodedImageFormat.Jpeg, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a JPEG. + /// + /// The output image stream. + /// The PDF encoded as Base64. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveJpeg(Stream imageStream, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageStream, SKEncodedImageFormat.Jpeg, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a JPEG. - /// - /// The output image file path. - /// The PDF as a byte array. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveJpeg(Stream imageStream, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageStream, SKEncodedImageFormat.Jpeg, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a JPEG. + /// + /// The output image file path. + /// The PDF as a byte array. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveJpeg(string imageFilename, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageFilename, SKEncodedImageFormat.Jpeg, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a JPEG. - /// - /// The output image stream. - /// The PDF as a byte array. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveJpeg(string imageFilename, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageFilename, SKEncodedImageFormat.Jpeg, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a JPEG. + /// + /// The output image stream. + /// The PDF as a byte array. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveJpeg(Stream imageStream, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageStream, SKEncodedImageFormat.Jpeg, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a JPEG. - /// - /// The output image file path. - /// The PDF as a stream. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveJpeg(Stream imageStream, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageStream, SKEncodedImageFormat.Jpeg, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a JPEG. + /// + /// The output image file path. + /// The PDF as a stream. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveJpeg(string imageFilename, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageFilename, SKEncodedImageFormat.Jpeg, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a JPEG. - /// - /// The output image stream. - /// The PDF as a stream. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveJpeg(string imageFilename, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageFilename, SKEncodedImageFormat.Jpeg, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a JPEG. + /// + /// The output image stream. + /// The PDF as a stream. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveJpeg(Stream imageStream, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageStream, SKEncodedImageFormat.Jpeg, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - #endregion - - #region SavePng - /// - /// Renders a single page of a given PDF and saves it as a PNG. - /// - /// The output image file path. - /// The PDF encoded as Base64. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveJpeg(Stream imageStream, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageStream, SKEncodedImageFormat.Jpeg, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + #endregion + + #region SavePng + /// + /// Renders a single page of a given PDF and saves it as a PNG. + /// + /// The output image file path. + /// The PDF encoded as Base64. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SavePng(string imageFilename, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageFilename, SKEncodedImageFormat.Png, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a PNG. - /// - /// The output image stream. - /// The PDF encoded as Base64. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SavePng(string imageFilename, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageFilename, SKEncodedImageFormat.Png, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a PNG. + /// + /// The output image stream. + /// The PDF encoded as Base64. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SavePng(Stream imageStream, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageStream, SKEncodedImageFormat.Png, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a PNG. - /// - /// The output image file path. - /// The PDF as a byte array. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SavePng(Stream imageStream, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageStream, SKEncodedImageFormat.Png, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a PNG. + /// + /// The output image file path. + /// The PDF as a byte array. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SavePng(string imageFilename, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageFilename, SKEncodedImageFormat.Png, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a PNG. - /// - /// The output image stream. - /// The PDF as a byte array. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SavePng(string imageFilename, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageFilename, SKEncodedImageFormat.Png, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a PNG. + /// + /// The output image stream. + /// The PDF as a byte array. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SavePng(Stream imageStream, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageStream, SKEncodedImageFormat.Png, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a PNG. - /// - /// The output image file path. - /// The PDF as a stream. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SavePng(Stream imageStream, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageStream, SKEncodedImageFormat.Png, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a PNG. + /// + /// The output image file path. + /// The PDF as a stream. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SavePng(string imageFilename, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageFilename, SKEncodedImageFormat.Png, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a PNG. - /// - /// The output image stream. - /// The PDF as a stream. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SavePng(string imageFilename, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageFilename, SKEncodedImageFormat.Png, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a PNG. + /// + /// The output image stream. + /// The PDF as a stream. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SavePng(Stream imageStream, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageStream, SKEncodedImageFormat.Png, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - #endregion - - #region SaveWebp - /// - /// Renders a single page of a given PDF and saves it as a bitmap. - /// - /// The output image file path. - /// The PDF encoded as Base64. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SavePng(Stream imageStream, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageStream, SKEncodedImageFormat.Png, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + #endregion + + #region SaveWebp + /// + /// Renders a single page of a given PDF and saves it as a bitmap. + /// + /// The output image file path. + /// The PDF encoded as Base64. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveWebp(string imageFilename, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageFilename, SKEncodedImageFormat.Webp, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a bitmap. - /// - /// The output image stream. - /// The PDF encoded as Base64. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveWebp(string imageFilename, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageFilename, SKEncodedImageFormat.Webp, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a bitmap. + /// + /// The output image stream. + /// The PDF encoded as Base64. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveWebp(Stream imageStream, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageStream, SKEncodedImageFormat.Webp, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a bitmap. - /// - /// The output image file path. - /// The PDF as a byte array. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveWebp(Stream imageStream, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageStream, SKEncodedImageFormat.Webp, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a bitmap. + /// + /// The output image file path. + /// The PDF as a byte array. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveWebp(string imageFilename, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageFilename, SKEncodedImageFormat.Webp, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a bitmap. - /// - /// The output image stream. - /// The PDF as a byte array. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveWebp(string imageFilename, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageFilename, SKEncodedImageFormat.Webp, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a bitmap. + /// + /// The output image stream. + /// The PDF as a byte array. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveWebp(Stream imageStream, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageStream, SKEncodedImageFormat.Webp, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a bitmap. - /// - /// The output image file path. - /// The PDF as a stream. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveWebp(Stream imageStream, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageStream, SKEncodedImageFormat.Webp, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a bitmap. + /// + /// The output image file path. + /// The PDF as a stream. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveWebp(string imageFilename, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageFilename, SKEncodedImageFormat.Webp, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF and saves it as a bitmap. - /// - /// The output image stream. - /// The PDF as a stream. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. + public static void SaveWebp(string imageFilename, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageFilename, SKEncodedImageFormat.Webp, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF and saves it as a bitmap. + /// + /// The output image stream. + /// The PDF as a stream. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static void SaveWebp(Stream imageStream, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - SaveImpl(imageStream, SKEncodedImageFormat.Webp, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - #endregion + public static void SaveWebp(Stream imageStream, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + SaveImpl(imageStream, SKEncodedImageFormat.Webp, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + #endregion - #region Internal save impl + #region Internal save impl #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - internal static void SaveImpl(string imageFilename, SKEncodedImageFormat format, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - if (imageFilename == null) - throw new ArgumentNullException(nameof(imageFilename)); + internal static void SaveImpl(string imageFilename, SKEncodedImageFormat format, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + if (imageFilename == null) + throw new ArgumentNullException(nameof(imageFilename)); - using var fileStream = new FileStream(imageFilename, FileMode.Create, FileAccess.Write); - SaveImpl(fileStream, format, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } + using var fileStream = new FileStream(imageFilename, FileMode.Create, FileAccess.Write); + SaveImpl(fileStream, format, pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - internal static void SaveImpl(Stream imageStream, SKEncodedImageFormat format, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - if (imageStream == null) - throw new ArgumentNullException(nameof(imageStream)); + internal static void SaveImpl(Stream imageStream, SKEncodedImageFormat format, string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + if (imageStream == null) + throw new ArgumentNullException(nameof(imageStream)); - ToImage(pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation).Encode(imageStream, format, 100); - } + ToImage(pdfAsBase64String, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor).Encode(imageStream, format, 100); + } #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - internal static void SaveImpl(string imageFilename, SKEncodedImageFormat format, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - if (imageFilename == null) - throw new ArgumentNullException(nameof(imageFilename)); + internal static void SaveImpl(string imageFilename, SKEncodedImageFormat format, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + if (imageFilename == null) + throw new ArgumentNullException(nameof(imageFilename)); - using var fileStream = new FileStream(imageFilename, FileMode.Create, FileAccess.Write); - SaveImpl(fileStream, format, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } + using var fileStream = new FileStream(imageFilename, FileMode.Create, FileAccess.Write); + SaveImpl(fileStream, format, pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - internal static void SaveImpl(Stream imageStream, SKEncodedImageFormat format, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - if (imageStream == null) - throw new ArgumentNullException(nameof(imageStream)); + internal static void SaveImpl(Stream imageStream, SKEncodedImageFormat format, byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + if (imageStream == null) + throw new ArgumentNullException(nameof(imageStream)); - ToImage(pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation).Encode(imageStream, format, 100); - } + ToImage(pdfAsByteArray, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor).Encode(imageStream, format, 100); + } #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - internal static void SaveImpl(string filename, SKEncodedImageFormat format, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - using var fileStream = new FileStream(filename, FileMode.Create, FileAccess.Write); - SaveImpl(fileStream, format, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } + internal static void SaveImpl(string filename, SKEncodedImageFormat format, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + using var fileStream = new FileStream(filename, FileMode.Create, FileAccess.Write); + SaveImpl(fileStream, format, pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - internal static void SaveImpl(Stream stream, SKEncodedImageFormat format, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - ToImage(pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation).Encode(stream, format, 100); - } - #endregion - - #region ToImage - /// - /// Renders a single page of a given PDF into an image. - /// - /// The PDF encoded as Base64. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The converted PDF page as an image. + internal static void SaveImpl(Stream stream, SKEncodedImageFormat format, Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + ToImage(pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor).Encode(stream, format, 100); + } + #endregion + + #region ToImage + /// + /// Renders a single page of a given PDF into an image. + /// + /// The PDF encoded as Base64. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The converted PDF page as an image. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static SKBitmap ToImage(string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - if (pdfAsBase64String == null) - throw new ArgumentNullException(nameof(pdfAsBase64String)); - - return ToImage(Convert.FromBase64String(pdfAsBase64String), password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF into an image. - /// - /// The PDF as a byte array. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The converted PDF page as an image. + public static SKBitmap ToImage(string pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + if (pdfAsBase64String == null) + throw new ArgumentNullException(nameof(pdfAsBase64String)); + + return ToImage(Convert.FromBase64String(pdfAsBase64String), password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF into an image. + /// + /// The PDF as a byte array. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The converted PDF page as an image. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static SKBitmap ToImage(byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - if (pdfAsByteArray == null) - throw new ArgumentNullException(nameof(pdfAsByteArray)); - - // Base64 string -> byte[] -> MemoryStream - using var pdfStream = new MemoryStream(pdfAsByteArray, false); - - return ToImage(pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF into an image. - /// - /// The PDF as a stream. - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The rendered PDF page as an image. + public static SKBitmap ToImage(byte[] pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + if (pdfAsByteArray == null) + throw new ArgumentNullException(nameof(pdfAsByteArray)); + + // Base64 string -> byte[] -> MemoryStream + using var pdfStream = new MemoryStream(pdfAsByteArray, false); + + return ToImage(pdfStream, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF into an image. + /// + /// The PDF as a stream. + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The rendered PDF page as an image. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static SKBitmap ToImage(Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - return ToImage(pdfStream, false, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders a single page of a given PDF into an image. - /// - /// The PDF as a stream. - /// to leave the open after the PDF document is loaded; otherwise, . - /// The password for opening the PDF. Use if no password is needed. - /// The specific page to be converted. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the desired . Use if the original width should be used. - /// The height of the desired . Use if the original height should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The rendered PDF page as an image. + public static SKBitmap ToImage(Stream pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + return ToImage(pdfStream, false, password, page, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders a single page of a given PDF into an image. + /// + /// The PDF as a stream. + /// to leave the open after the PDF document is loaded; otherwise, . + /// The password for opening the PDF. Use if no password is needed. + /// The specific page to be converted. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the desired . Use if the original width should be used. + /// The height of the desired . Use if the original height should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The rendered PDF page as an image. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static SKBitmap ToImage(Stream pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - if (pdfStream == null) - throw new ArgumentNullException(nameof(pdfStream)); - - if (page < 0) - throw new ArgumentOutOfRangeException(nameof(page), "The page number must be 0 or greater."); - - // correct the width and height for the given dpi - // but only if both width and height are not specified (so the original sizes are corrected) - var renderFlags = PdfRenderFlags.ForPrinting; - if (width == null && height == null) - renderFlags |= PdfRenderFlags.CorrectFromDpi; - - if (withAnnotations) - renderFlags |= PdfRenderFlags.Annotations; - - // Stream -> PdfiumViewer.PdfDocument - using var pdfDocument = PdfDocument.Load(pdfStream, password, !leaveOpen); - - if (page >= pdfDocument.PageSizes.Count) - throw new ArgumentOutOfRangeException(nameof(page), $"The page number {page} does not exist. Highest page number available is {pdfDocument.PageSizes.Count - 1}."); - - var pageSize = pdfDocument.PageSizes[page]; - - // correct aspect ratio if requested - if (withAspectRatio) - AdjustForAspectRatio(ref width, ref height, pageSize); - - // PdfiumViewer.PdfDocument -> Image - return pdfDocument.Render(page, width ?? (int)pageSize.Width, height ?? (int)pageSize.Height, dpi, dpi, rotation, renderFlags, withFormFill); - } - #endregion - - #region ToImages - /// - /// Renders all pages of a given PDF into images. - /// - /// The PDF encoded as Base64. - /// The password for opening the PDF. Use if no password is needed. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the all pages. Use if the original width (per page) should be used. - /// The height of all pages. Use if the original height (per page) should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The rendered PDF pages as images. + public static SKBitmap ToImage(Stream pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + if (pdfStream == null) + throw new ArgumentNullException(nameof(pdfStream)); + + if (page < 0) + throw new ArgumentOutOfRangeException(nameof(page), "The page number must be 0 or greater."); + + // correct the width and height for the given dpi + // but only if both width and height are not specified (so the original sizes are corrected) + var correctFromDpi = width == null && height == null; + + NativeMethods.FPDF renderFlags = default; + + if (withAnnotations) + renderFlags |= NativeMethods.FPDF.ANNOT; + + if (!antiAliasing.HasFlag(PdfAntiAliasing.Text)) + renderFlags |= NativeMethods.FPDF.RENDER_NO_SMOOTHTEXT; + if (!antiAliasing.HasFlag(PdfAntiAliasing.Images)) + renderFlags |= NativeMethods.FPDF.RENDER_NO_SMOOTHIMAGE; + if (!antiAliasing.HasFlag(PdfAntiAliasing.Paths)) + renderFlags |= NativeMethods.FPDF.RENDER_NO_SMOOTHPATH; + + // Stream -> PdfiumViewer.PdfDocument + using var pdfDocument = PdfDocument.Load(pdfStream, password, !leaveOpen); + + if (page >= pdfDocument.PageSizes.Count) + throw new ArgumentOutOfRangeException(nameof(page), $"The page number {page} does not exist. Highest page number available is {pdfDocument.PageSizes.Count - 1}."); + + var pageSize = pdfDocument.PageSizes[page]; + + // correct aspect ratio if requested + if (withAspectRatio) + AdjustForAspectRatio(ref width, ref height, pageSize); + + // PdfiumViewer.PdfDocument -> Image + return pdfDocument.Render(page, width ?? (int)pageSize.Width, height ?? (int)pageSize.Height, dpi, dpi, rotation, renderFlags, withFormFill, correctFromDpi, backgroundColor ?? SKColors.White); + } + #endregion + + #region ToImages + /// + /// Renders all pages of a given PDF into images. + /// + /// The PDF encoded as Base64. + /// The password for opening the PDF. Use if no password is needed. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the all pages. Use if the original width (per page) should be used. + /// The height of all pages. Use if the original height (per page) should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The rendered PDF pages as images. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static IEnumerable ToImages(string pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - if (pdfAsBase64String == null) - throw new ArgumentNullException(nameof(pdfAsBase64String)); - - foreach (var image in ToImages(Convert.FromBase64String(pdfAsBase64String), password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation)) - { - yield return image; - } - } - - /// - /// Renders all pages of a given PDF into images. - /// - /// The PDF as a byte array. - /// The password for opening the PDF. Use if no password is needed. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the all pages. Use if the original width (per page) should be used. - /// The height of all pages. Use if the original height (per page) should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The rendered PDF pages as images. + public static IEnumerable ToImages(string pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + if (pdfAsBase64String == null) + throw new ArgumentNullException(nameof(pdfAsBase64String)); + + foreach (var image in ToImages(Convert.FromBase64String(pdfAsBase64String), password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor)) + { + yield return image; + } + } + + /// + /// Renders all pages of a given PDF into images. + /// + /// The PDF as a byte array. + /// The password for opening the PDF. Use if no password is needed. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the all pages. Use if the original width (per page) should be used. + /// The height of all pages. Use if the original height (per page) should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The rendered PDF pages as images. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static IEnumerable ToImages(byte[] pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - if (pdfAsByteArray == null) - throw new ArgumentNullException(nameof(pdfAsByteArray)); - - // Base64 string -> byte[] -> MemoryStream - using var pdfStream = new MemoryStream(pdfAsByteArray, false); - - foreach (var image in ToImages(pdfStream, password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation)) - { - yield return image; - } - } - - /// - /// Renders all pages of a given PDF into images. - /// - /// The PDF as a stream. - /// The password for opening the PDF. Use if no password is needed. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the all pages. Use if the original width (per page) should be used. - /// The height of all pages. Use if the original height (per page) should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The rendered PDF pages as images. + public static IEnumerable ToImages(byte[] pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + if (pdfAsByteArray == null) + throw new ArgumentNullException(nameof(pdfAsByteArray)); + + // Base64 string -> byte[] -> MemoryStream + using var pdfStream = new MemoryStream(pdfAsByteArray, false); + + foreach (var image in ToImages(pdfStream, password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor)) + { + yield return image; + } + } + + /// + /// Renders all pages of a given PDF into images. + /// + /// The PDF as a stream. + /// The password for opening the PDF. Use if no password is needed. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the all pages. Use if the original width (per page) should be used. + /// The height of all pages. Use if the original height (per page) should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The rendered PDF pages as images. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static IEnumerable ToImages(Stream pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - return ToImages(pdfStream, false, password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation); - } - - /// - /// Renders all pages of a given PDF into images. - /// - /// The PDF as a stream. - /// to leave the open after the PDF document is loaded; otherwise, . - /// The password for opening the PDF. Use if no password is needed. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the all pages. Use if the original width (per page) should be used. - /// The height of all pages. Use if the original height (per page) should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The rendered PDF pages as images. + public static IEnumerable ToImages(Stream pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + return ToImages(pdfStream, false, password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor); + } + + /// + /// Renders all pages of a given PDF into images. + /// + /// The PDF as a stream. + /// to leave the open after the PDF document is loaded; otherwise, . + /// The password for opening the PDF. Use if no password is needed. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the all pages. Use if the original width (per page) should be used. + /// The height of all pages. Use if the original height (per page) should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The rendered PDF pages as images. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static IEnumerable ToImages(Stream pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0) - { - if (pdfStream == null) - throw new ArgumentNullException(nameof(pdfStream)); - - // correct the width and height for the given dpi - // but only if both width and height are not specified (so the original sizes are corrected) - var renderFlags = PdfRenderFlags.ForPrinting; - if (width == null && height == null) - renderFlags |= PdfRenderFlags.CorrectFromDpi; - - if (withAnnotations) - renderFlags |= PdfRenderFlags.Annotations; - - // Stream -> PdfiumViewer.PdfDocument - using var pdfDocument = PdfDocument.Load(pdfStream, password, !leaveOpen); - - for (int i = 0; i < pdfDocument.PageSizes.Count; i++) - { - var currentWidth = width; - var currentHeight = height; - var pageSize = pdfDocument.PageSizes[i]; - - // correct aspect ratio if requested - if (withAspectRatio) - AdjustForAspectRatio(ref currentWidth, ref currentHeight, pageSize); - - // PdfiumViewer.PdfDocument -> Image - yield return pdfDocument.Render(i, currentWidth ?? (int)pageSize.Width, currentHeight ?? (int)pageSize.Height, dpi, dpi, rotation, renderFlags, withFormFill); - } - } - #endregion - - #region ToImagesAsnyc + public static IEnumerable ToImages(Stream pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null) + { + if (pdfStream == null) + throw new ArgumentNullException(nameof(pdfStream)); + + // correct the width and height for the given dpi + // but only if both width and height are not specified (so the original sizes are corrected) + var correctFromDpi = width == null && height == null; + + NativeMethods.FPDF renderFlags = default; + + if (withAnnotations) + renderFlags |= NativeMethods.FPDF.ANNOT; + + if (!antiAliasing.HasFlag(PdfAntiAliasing.Text)) + renderFlags |= NativeMethods.FPDF.RENDER_NO_SMOOTHTEXT; + if (!antiAliasing.HasFlag(PdfAntiAliasing.Images)) + renderFlags |= NativeMethods.FPDF.RENDER_NO_SMOOTHIMAGE; + if (!antiAliasing.HasFlag(PdfAntiAliasing.Paths)) + renderFlags |= NativeMethods.FPDF.RENDER_NO_SMOOTHPATH; + + // Stream -> PdfiumViewer.PdfDocument + using var pdfDocument = PdfDocument.Load(pdfStream, password, !leaveOpen); + + for (int i = 0; i < pdfDocument.PageSizes.Count; i++) + { + var currentWidth = width; + var currentHeight = height; + var pageSize = pdfDocument.PageSizes[i]; + + // correct aspect ratio if requested + if (withAspectRatio) + AdjustForAspectRatio(ref currentWidth, ref currentHeight, pageSize); + + // PdfiumViewer.PdfDocument -> Image + yield return pdfDocument.Render(i, currentWidth ?? (int)pageSize.Width, currentHeight ?? (int)pageSize.Height, dpi, dpi, rotation, renderFlags, withFormFill, correctFromDpi, backgroundColor ?? SKColors.White); + } + } + #endregion + + #region ToImagesAsnyc #if NET6_0_OR_GREATER - /// - /// Renders all pages of a given PDF into images. - /// - /// The PDF encoded as Base64. - /// The cancellation token to cancel the conversion. Please note that an ongoing rendering cannot be cancelled (the next page will not be rendered though). - /// The password for opening the PDF. Use if no password is needed. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the all pages. Use if the original width (per page) should be used. - /// The height of all pages. Use if the original height (per page) should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The rendered PDF pages as images. - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] - public static async IAsyncEnumerable ToImagesAsync(string pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, [EnumeratorCancellation] CancellationToken cancellationToken = default) - { - if (pdfAsBase64String == null) - throw new ArgumentNullException(nameof(pdfAsBase64String)); - - await foreach (var image in ToImagesAsync(Convert.FromBase64String(pdfAsBase64String), password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, cancellationToken)) - { - yield return image; - } - } - - /// - /// Renders all pages of a given PDF into images. - /// - /// The PDF as a byte array. - /// The cancellation token to cancel the conversion. Please note that an ongoing rendering cannot be cancelled (the next page will not be rendered though). - /// The password for opening the PDF. Use if no password is needed. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the all pages. Use if the original width (per page) should be used. - /// The height of all pages. Use if the original height (per page) should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The rendered PDF pages as images. + /// + /// Renders all pages of a given PDF into images. + /// + /// The PDF encoded as Base64. + /// The cancellation token to cancel the conversion. Please note that an ongoing rendering cannot be cancelled (the next page will not be rendered though). + /// The password for opening the PDF. Use if no password is needed. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the all pages. Use if the original width (per page) should be used. + /// The height of all pages. Use if the original height (per page) should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The rendered PDF pages as images. + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] + public static async IAsyncEnumerable ToImagesAsync(string pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null, [EnumeratorCancellation] CancellationToken cancellationToken = default) + { + if (pdfAsBase64String == null) + throw new ArgumentNullException(nameof(pdfAsBase64String)); + + await foreach (var image in ToImagesAsync(Convert.FromBase64String(pdfAsBase64String), password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor, cancellationToken)) + { + yield return image; + } + } + + /// + /// Renders all pages of a given PDF into images. + /// + /// The PDF as a byte array. + /// The cancellation token to cancel the conversion. Please note that an ongoing rendering cannot be cancelled (the next page will not be rendered though). + /// The password for opening the PDF. Use if no password is needed. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the all pages. Use if the original width (per page) should be used. + /// The height of all pages. Use if the original height (per page) should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The rendered PDF pages as images. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static async IAsyncEnumerable ToImagesAsync(byte[] pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, [EnumeratorCancellation] CancellationToken cancellationToken = default) - { - if (pdfAsByteArray == null) - throw new ArgumentNullException(nameof(pdfAsByteArray)); - - // Base64 string -> byte[] -> MemoryStream - using var pdfStream = new MemoryStream(pdfAsByteArray, false); - - await foreach (var image in ToImagesAsync(pdfStream, password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, cancellationToken)) - { - yield return image; - } - } - - /// - /// Renders all pages of a given PDF into images. - /// - /// The PDF as a stream. - /// The cancellation token to cancel the conversion. Please note that an ongoing rendering cannot be cancelled (the next page will not be rendered though). - /// The password for opening the PDF. Use if no password is needed. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the all pages. Use if the original width (per page) should be used. - /// The height of all pages. Use if the original height (per page) should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The rendered PDF pages as images. + public static async IAsyncEnumerable ToImagesAsync(byte[] pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null, [EnumeratorCancellation] CancellationToken cancellationToken = default) + { + if (pdfAsByteArray == null) + throw new ArgumentNullException(nameof(pdfAsByteArray)); + + // Base64 string -> byte[] -> MemoryStream + using var pdfStream = new MemoryStream(pdfAsByteArray, false); + + await foreach (var image in ToImagesAsync(pdfStream, password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor, cancellationToken)) + { + yield return image; + } + } + + /// + /// Renders all pages of a given PDF into images. + /// + /// The PDF as a stream. + /// The cancellation token to cancel the conversion. Please note that an ongoing rendering cannot be cancelled (the next page will not be rendered though). + /// The password for opening the PDF. Use if no password is needed. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the all pages. Use if the original width (per page) should be used. + /// The height of all pages. Use if the original height (per page) should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The rendered PDF pages as images. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static async IAsyncEnumerable ToImagesAsync(Stream pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, [EnumeratorCancellation] CancellationToken cancellationToken = default) - { - await foreach (var image in ToImagesAsync(pdfStream, false, password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, cancellationToken)) - { - yield return image; - } - } - - /// - /// Renders all pages of a given PDF into images. - /// - /// The PDF as a stream. - /// to leave the open after the PDF document is loaded; otherwise, . - /// The cancellation token to cancel the conversion. Please note that an ongoing rendering cannot be cancelled (the next page will not be rendered though). - /// The password for opening the PDF. Use if no password is needed. - /// The DPI scaling to use for rasterization of the PDF. - /// The width of the all pages. Use if the original width (per page) should be used. - /// The height of all pages. Use if the original height (per page) should be used. - /// Specifies whether annotations be rendered. - /// Specifies whether form filling will be rendered. - /// Specifies that or should be adjusted for aspect ratio (either one must be ). - /// Specifies the rotation at 90 degree intervals. - /// The rendered PDF pages as images. + public static async IAsyncEnumerable ToImagesAsync(Stream pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null, [EnumeratorCancellation] CancellationToken cancellationToken = default) + { + await foreach (var image in ToImagesAsync(pdfStream, false, password, dpi, width, height, withAnnotations, withFormFill, withAspectRatio, rotation, antiAliasing, backgroundColor, cancellationToken)) + { + yield return image; + } + } + + /// + /// Renders all pages of a given PDF into images. + /// + /// The PDF as a stream. + /// to leave the open after the PDF document is loaded; otherwise, . + /// The cancellation token to cancel the conversion. Please note that an ongoing rendering cannot be cancelled (the next page will not be rendered though). + /// The password for opening the PDF. Use if no password is needed. + /// The DPI scaling to use for rasterization of the PDF. + /// The width of the all pages. Use if the original width (per page) should be used. + /// The height of all pages. Use if the original height (per page) should be used. + /// Specifies whether annotations be rendered. + /// Specifies whether form filling will be rendered. + /// Specifies that or should be adjusted for aspect ratio (either one must be ). + /// Specifies the rotation at 90 degree intervals. + /// Specifies which parts of the PDF should be anti-aliasing for rendering. + /// Specifies the background color. Defaults to . + /// The rendered PDF pages as images. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static async IAsyncEnumerable ToImagesAsync(Stream pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, [EnumeratorCancellation] CancellationToken cancellationToken = default) - { - if (pdfStream == null) - throw new ArgumentNullException(nameof(pdfStream)); - - // correct the width and height for the given dpi - // but only if both width and height are not specified (so the original sizes are corrected) - var renderFlags = PdfRenderFlags.ForPrinting; - if (width == null && height == null) - renderFlags |= PdfRenderFlags.CorrectFromDpi; - - if (withAnnotations) - renderFlags |= PdfRenderFlags.Annotations; - - // Stream -> PdfiumViewer.PdfDocument - using var pdfDocument = await Task.Run(() => PdfDocument.Load(pdfStream, password, !leaveOpen), cancellationToken); - - for (int i = 0; i < pdfDocument.PageSizes.Count; i++) - { - cancellationToken.ThrowIfCancellationRequested(); - - var currentWidth = width; - var currentHeight = height; - var pageSize = pdfDocument.PageSizes[i]; - - // correct aspect ratio if requested - if (withAspectRatio) - AdjustForAspectRatio(ref currentWidth, ref currentHeight, pageSize); - - // PdfiumViewer.PdfDocument -> Image - yield return await Task.Run(() => pdfDocument.Render(i, currentWidth ?? (int)pageSize.Width, currentHeight ?? (int)pageSize.Height, dpi, dpi, rotation, renderFlags, withFormFill), cancellationToken); - } - } + public static async IAsyncEnumerable ToImagesAsync(Stream pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PdfRotation rotation = PdfRotation.Rotate0, PdfAntiAliasing antiAliasing = PdfAntiAliasing.All, SKColor? backgroundColor = null, [EnumeratorCancellation] CancellationToken cancellationToken = default) + { + if (pdfStream == null) + throw new ArgumentNullException(nameof(pdfStream)); + + // correct the width and height for the given dpi + // but only if both width and height are not specified (so the original sizes are corrected) + var correctFromDpi = width == null && height == null; + + NativeMethods.FPDF renderFlags = default; + + if (withAnnotations) + renderFlags |= NativeMethods.FPDF.ANNOT; + + if (!antiAliasing.HasFlag(PdfAntiAliasing.Text)) + renderFlags |= NativeMethods.FPDF.RENDER_NO_SMOOTHTEXT; + if (!antiAliasing.HasFlag(PdfAntiAliasing.Images)) + renderFlags |= NativeMethods.FPDF.RENDER_NO_SMOOTHIMAGE; + if (!antiAliasing.HasFlag(PdfAntiAliasing.Paths)) + renderFlags |= NativeMethods.FPDF.RENDER_NO_SMOOTHPATH; + + // Stream -> PdfiumViewer.PdfDocument + using var pdfDocument = await Task.Run(() => PdfDocument.Load(pdfStream, password, !leaveOpen), cancellationToken); + + for (int i = 0; i < pdfDocument.PageSizes.Count; i++) + { + cancellationToken.ThrowIfCancellationRequested(); + + var currentWidth = width; + var currentHeight = height; + var pageSize = pdfDocument.PageSizes[i]; + + // correct aspect ratio if requested + if (withAspectRatio) + AdjustForAspectRatio(ref currentWidth, ref currentHeight, pageSize); + + // PdfiumViewer.PdfDocument -> Image + yield return await Task.Run(() => pdfDocument.Render(i, currentWidth ?? (int)pageSize.Width, currentHeight ?? (int)pageSize.Height, dpi, dpi, rotation, renderFlags, withFormFill, correctFromDpi, backgroundColor ?? SKColors.White), cancellationToken); + } + } #endif - #endregion - - #region GetPageCount - /// - /// Returns the page count of a given PDF. - /// - /// The PDF encoded as Base64. - /// The password for opening the PDF. Use if no password is needed. - /// The page count of the given PDF. + #endregion + + #region GetPageCount + /// + /// Returns the page count of a given PDF. + /// + /// The PDF encoded as Base64. + /// The password for opening the PDF. Use if no password is needed. + /// The page count of the given PDF. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static int GetPageCount(string pdfAsBase64String, string? password = null) - { - if (pdfAsBase64String == null) - throw new ArgumentNullException(nameof(pdfAsBase64String)); - - return GetPageCount(Convert.FromBase64String(pdfAsBase64String), password); - } - - /// - /// Returns the page count of a given PDF. - /// - /// The PDF as a byte array. - /// The password for opening the PDF. Use if no password is needed. - /// The page count of the given PDF. + public static int GetPageCount(string pdfAsBase64String, string? password = null) + { + if (pdfAsBase64String == null) + throw new ArgumentNullException(nameof(pdfAsBase64String)); + + return GetPageCount(Convert.FromBase64String(pdfAsBase64String), password); + } + + /// + /// Returns the page count of a given PDF. + /// + /// The PDF as a byte array. + /// The password for opening the PDF. Use if no password is needed. + /// The page count of the given PDF. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static int GetPageCount(byte[] pdfAsByteArray, string? password = null) - { - if (pdfAsByteArray == null) - throw new ArgumentNullException(nameof(pdfAsByteArray)); - - // Base64 string -> byte[] -> MemoryStream - using var pdfStream = new MemoryStream(pdfAsByteArray, false); - - return GetPageCount(pdfStream, password); - } - - /// - /// Returns the page count of a given PDF. - /// - /// The PDF as a stream. - /// The password for opening the PDF. Use if no password is needed. - /// The page count of the given PDF. + public static int GetPageCount(byte[] pdfAsByteArray, string? password = null) + { + if (pdfAsByteArray == null) + throw new ArgumentNullException(nameof(pdfAsByteArray)); + + // Base64 string -> byte[] -> MemoryStream + using var pdfStream = new MemoryStream(pdfAsByteArray, false); + + return GetPageCount(pdfStream, password); + } + + /// + /// Returns the page count of a given PDF. + /// + /// The PDF as a stream. + /// The password for opening the PDF. Use if no password is needed. + /// The page count of the given PDF. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static int GetPageCount(Stream pdfStream, string? password = null) - { - return GetPageCount(pdfStream, false, password); - } - - /// - /// Returns the page count of a given PDF. - /// - /// The PDF as a stream. - /// to leave the open after the PDF document is loaded; otherwise, . - /// The password for opening the PDF. Use if no password is needed. - /// The page count of the given PDF. + public static int GetPageCount(Stream pdfStream, string? password = null) + { + return GetPageCount(pdfStream, false, password); + } + + /// + /// Returns the page count of a given PDF. + /// + /// The PDF as a stream. + /// to leave the open after the PDF document is loaded; otherwise, . + /// The password for opening the PDF. Use if no password is needed. + /// The page count of the given PDF. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static int GetPageCount(Stream pdfStream, bool leaveOpen, string? password = null) - { - if (pdfStream == null) - throw new ArgumentNullException(nameof(pdfStream)); - - using var pdfDocument = PdfDocument.Load(pdfStream, password, !leaveOpen); - - return pdfDocument.PageSizes.Count; - } - #endregion - - #region GetPageSize - /// - /// Returns the PDF page size for a given page number. - /// - /// The PDF encoded as Base64. - /// The specific page to query the size for. - /// The password for opening the PDF. Use if no password is needed. - /// The page size containing width and height. + public static int GetPageCount(Stream pdfStream, bool leaveOpen, string? password = null) + { + if (pdfStream == null) + throw new ArgumentNullException(nameof(pdfStream)); + + using var pdfDocument = PdfDocument.Load(pdfStream, password, !leaveOpen); + + return pdfDocument.PageSizes.Count; + } + #endregion + + #region GetPageSize + /// + /// Returns the PDF page size for a given page number. + /// + /// The PDF encoded as Base64. + /// The specific page to query the size for. + /// The password for opening the PDF. Use if no password is needed. + /// The page size containing width and height. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static SizeF GetPageSize(string pdfAsBase64String, int page, string? password = null) - { - if (pdfAsBase64String == null) - throw new ArgumentNullException(nameof(pdfAsBase64String)); - - return GetPageSize(Convert.FromBase64String(pdfAsBase64String), page, password); - } - - /// - /// Returns the PDF page size for a given page number. - /// - /// The PDF as a byte array. - /// The specific page to query the size for. - /// The password for opening the PDF. Use if no password is needed. - /// The page size containing width and height. + public static SizeF GetPageSize(string pdfAsBase64String, int page, string? password = null) + { + if (pdfAsBase64String == null) + throw new ArgumentNullException(nameof(pdfAsBase64String)); + + return GetPageSize(Convert.FromBase64String(pdfAsBase64String), page, password); + } + + /// + /// Returns the PDF page size for a given page number. + /// + /// The PDF as a byte array. + /// The specific page to query the size for. + /// The password for opening the PDF. Use if no password is needed. + /// The page size containing width and height. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static SizeF GetPageSize(byte[] pdfAsByteArray, int page, string? password = null) - { - if (pdfAsByteArray == null) - throw new ArgumentNullException(nameof(pdfAsByteArray)); - - // Base64 string -> byte[] -> MemoryStream - using var pdfStream = new MemoryStream(pdfAsByteArray, false); - - return GetPageSize(pdfStream, page, password); - } - - /// - /// Returns the PDF page size for a given page number. - /// - /// The PDF as a stream. - /// The specific page to query the size for. - /// The password for opening the PDF. Use if no password is needed. - /// The page size containing width and height. + public static SizeF GetPageSize(byte[] pdfAsByteArray, int page, string? password = null) + { + if (pdfAsByteArray == null) + throw new ArgumentNullException(nameof(pdfAsByteArray)); + + // Base64 string -> byte[] -> MemoryStream + using var pdfStream = new MemoryStream(pdfAsByteArray, false); + + return GetPageSize(pdfStream, page, password); + } + + /// + /// Returns the PDF page size for a given page number. + /// + /// The PDF as a stream. + /// The specific page to query the size for. + /// The password for opening the PDF. Use if no password is needed. + /// The page size containing width and height. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static SizeF GetPageSize(Stream pdfStream, int page, string? password = null) - { - return GetPageSize(pdfStream, false, page, password); - } - - /// - /// Returns the PDF page size for a given page number. - /// - /// The PDF as a stream. - /// to leave the open after the PDF document is loaded; otherwise, . - /// The specific page to query the size for. - /// The password for opening the PDF. Use if no password is needed. - /// The page size containing width and height. + public static SizeF GetPageSize(Stream pdfStream, int page, string? password = null) + { + return GetPageSize(pdfStream, false, page, password); + } + + /// + /// Returns the PDF page size for a given page number. + /// + /// The PDF as a stream. + /// to leave the open after the PDF document is loaded; otherwise, . + /// The specific page to query the size for. + /// The password for opening the PDF. Use if no password is needed. + /// The page size containing width and height. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static SizeF GetPageSize(Stream pdfStream, bool leaveOpen, int page, string? password = null) - { - if (pdfStream == null) - throw new ArgumentNullException(nameof(pdfStream)); - - if (page < 0) - throw new ArgumentOutOfRangeException(nameof(page), "The page number must be 0 or greater."); - - using var pdfDocument = PdfDocument.Load(pdfStream, password, !leaveOpen); - - return pdfDocument.PageSizes[page]; - } - #endregion - - #region GetPageSizes - /// - /// Returns the sizes of all PDF pages. - /// - /// The PDF encoded as Base64. - /// The password for opening the PDF. Use if no password is needed. - /// The page sizes containing width and height. + public static SizeF GetPageSize(Stream pdfStream, bool leaveOpen, int page, string? password = null) + { + if (pdfStream == null) + throw new ArgumentNullException(nameof(pdfStream)); + + if (page < 0) + throw new ArgumentOutOfRangeException(nameof(page), "The page number must be 0 or greater."); + + using var pdfDocument = PdfDocument.Load(pdfStream, password, !leaveOpen); + + return pdfDocument.PageSizes[page]; + } + #endregion + + #region GetPageSizes + /// + /// Returns the sizes of all PDF pages. + /// + /// The PDF encoded as Base64. + /// The password for opening the PDF. Use if no password is needed. + /// The page sizes containing width and height. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static IList GetPageSizes(string pdfAsBase64String, string? password = null) - { - if (pdfAsBase64String == null) - throw new ArgumentNullException(nameof(pdfAsBase64String)); - - return GetPageSizes(Convert.FromBase64String(pdfAsBase64String), password); - } - - /// - /// Returns the sizes of all PDF pages. - /// - /// The PDF as a byte array. - /// The password for opening the PDF. Use if no password is needed. - /// The page sizes containing width and height. + public static IList GetPageSizes(string pdfAsBase64String, string? password = null) + { + if (pdfAsBase64String == null) + throw new ArgumentNullException(nameof(pdfAsBase64String)); + + return GetPageSizes(Convert.FromBase64String(pdfAsBase64String), password); + } + + /// + /// Returns the sizes of all PDF pages. + /// + /// The PDF as a byte array. + /// The password for opening the PDF. Use if no password is needed. + /// The page sizes containing width and height. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static IList GetPageSizes(byte[] pdfAsByteArray, string? password = null) - { - if (pdfAsByteArray == null) - throw new ArgumentNullException(nameof(pdfAsByteArray)); - - // Base64 string -> byte[] -> MemoryStream - using var pdfStream = new MemoryStream(pdfAsByteArray, false); - - return GetPageSizes(pdfStream, password); - } - - /// - /// Returns the sizes of all PDF pages. - /// - /// The PDF as a stream. - /// The password for opening the PDF. Use if no password is needed. - /// The page sizes containing width and height. + public static IList GetPageSizes(byte[] pdfAsByteArray, string? password = null) + { + if (pdfAsByteArray == null) + throw new ArgumentNullException(nameof(pdfAsByteArray)); + + // Base64 string -> byte[] -> MemoryStream + using var pdfStream = new MemoryStream(pdfAsByteArray, false); + + return GetPageSizes(pdfStream, password); + } + + /// + /// Returns the sizes of all PDF pages. + /// + /// The PDF as a stream. + /// The password for opening the PDF. Use if no password is needed. + /// The page sizes containing width and height. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static IList GetPageSizes(Stream pdfStream, string? password = null) - { - return GetPageSizes(pdfStream, false, password); - } - - /// - /// Returns the sizes of all PDF pages. - /// - /// The PDF as a stream. - /// to leave the open after the PDF document is loaded; otherwise, . - /// The password for opening the PDF. Use if no password is needed. - /// The page sizes containing width and height. + public static IList GetPageSizes(Stream pdfStream, string? password = null) + { + return GetPageSizes(pdfStream, false, password); + } + + /// + /// Returns the sizes of all PDF pages. + /// + /// The PDF as a stream. + /// to leave the open after the PDF document is loaded; otherwise, . + /// The password for opening the PDF. Use if no password is needed. + /// The page sizes containing width and height. #if NET6_0_OR_GREATER - [SupportedOSPlatform("Windows")] - [SupportedOSPlatform("Linux")] - [SupportedOSPlatform("macOS")] - [SupportedOSPlatform("Android31.0")] + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Android31.0")] #endif - public static IList GetPageSizes(Stream pdfStream, bool leaveOpen, string? password = null) - { - if (pdfStream == null) - throw new ArgumentNullException(nameof(pdfStream)); - - using var pdfDocument = PdfDocument.Load(pdfStream, password, !leaveOpen); - - return pdfDocument.PageSizes.ToList().AsReadOnly(); - } - #endregion - - private static void AdjustForAspectRatio(ref int? width, ref int? height, SizeF pageSize) - { - if (width == null && height != null) - { - width = (int)Math.Round((pageSize.Width / pageSize.Height) * height.Value); - } - else if (width != null && height == null) - { - height = (int)Math.Round((pageSize.Height / pageSize.Width) * width.Value); - } - } - } + public static IList GetPageSizes(Stream pdfStream, bool leaveOpen, string? password = null) + { + if (pdfStream == null) + throw new ArgumentNullException(nameof(pdfStream)); + + using var pdfDocument = PdfDocument.Load(pdfStream, password, !leaveOpen); + + return pdfDocument.PageSizes.ToList().AsReadOnly(); + } + #endregion + + private static void AdjustForAspectRatio(ref int? width, ref int? height, SizeF pageSize) + { + if (width == null && height != null) + { + width = (int)Math.Round((pageSize.Width / pageSize.Height) * height.Value); + } + else if (width != null && height == null) + { + height = (int)Math.Round((pageSize.Height / pageSize.Width) * width.Value); + } + } + } } \ No newline at end of file diff --git a/src/PDFtoImage/PDFtoImage.csproj b/src/PDFtoImage/PDFtoImage.csproj index 80b52a00..b86661bb 100644 --- a/src/PDFtoImage/PDFtoImage.csproj +++ b/src/PDFtoImage/PDFtoImage.csproj @@ -12,7 +12,7 @@ - 2.4.3 + 3.0.0 David Sungaila false @@ -21,7 +21,8 @@ https://github.com/sungaila/PDFtoImage https://raw.githubusercontent.com/sungaila/PDFtoImage/master/etc/Icon_128.png A .NET library to render PDF files into images. - - Cleanup of native lib loading for .NET (Core). + - Added optional parameter antiAliasing. +- Added optional parameter backgroundColor. PDF Bitmap Image Convert Conversion C# PDFium SkiaSharp Skia PNG JPG JPEG WEBP Xamarin Android MonoAndroid MAUI wasm WebAssembly https://github.com/sungaila/PDFtoImage.git git @@ -79,15 +80,15 @@ - + - - - + + + @@ -96,7 +97,7 @@ - + diff --git a/src/PDFtoImage/PdfAntiAliasing.cs b/src/PDFtoImage/PdfAntiAliasing.cs new file mode 100644 index 00000000..8e32c904 --- /dev/null +++ b/src/PDFtoImage/PdfAntiAliasing.cs @@ -0,0 +1,36 @@ +using System; + +namespace PDFtoImage +{ + /// + /// Specifies which parts of the PDF should be rendered with anti-aliasing. + /// + [Flags] + public enum PdfAntiAliasing + { + /// + /// No anti-aliasing. + /// + None = 0, + + /// + /// Use anti-aliasing on text. + /// + Text = 1 << 0, + + /// + /// Use anti-aliasing on images. + /// + Images = 1 << 1, + + /// + /// Use anti-aliasing on paths. + /// + Paths = 1 << 2, + + /// + /// Use anti-aliasing on everything. + /// + All = Text | Images | Paths + } +} \ No newline at end of file diff --git a/src/PDFtoImage/PdfiumViewer/NativeMethods.Pdfium.cs b/src/PDFtoImage/PdfiumViewer/NativeMethods.Pdfium.cs index 2f732840..3df6f311 100644 --- a/src/PDFtoImage/PdfiumViewer/NativeMethods.Pdfium.cs +++ b/src/PDFtoImage/PdfiumViewer/NativeMethods.Pdfium.cs @@ -5,8 +5,10 @@ namespace PDFtoImage.PdfiumViewer { +#if NET8_0_OR_GREATER #pragma warning disable CA2101 // Specify marshalling for P/Invoke string arguments #pragma warning disable SYSLIB1054 // Use LibraryImportAttribute instead of DllImportAttribute to generate p/invoke marshalling code at compile time. +#endif internal static partial class NativeMethods { // Interned strings are cached over AppDomains. This means that when we @@ -314,7 +316,7 @@ public static void FPDF_RemoveFormFieldHighlight(IntPtr form) #endif #if NET6_0_OR_GREATER - [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] #endif private static int FPDF_GetBlock(IntPtr param, uint position, IntPtr buffer, uint size) { @@ -654,16 +656,77 @@ public enum FPDFPAGE_AACTION [Flags] public enum FPDF { + /// + /// Set if annotations are to be rendered. + /// ANNOT = 0x01, + + /// + /// Set if using text rendering optimized for LCD display. This flag will only take effect if anti-aliasing is enabled for text. + /// LCD_TEXT = 0x02, + + /// + /// Don't use the native text output available on some platforms. + /// NO_NATIVETEXT = 0x04, + + /// + /// Grayscale output. + /// GRAYSCALE = 0x08, + + /// + /// Obsolete, has no effect, retained for compatibility. + /// + [Obsolete("Obsolete, has no effect, retained for compatibility.")] DEBUG_INFO = 0x80, + + /// + /// Obsolete, has no effect, retained for compatibility. + /// + [Obsolete("Obsolete, has no effect, retained for compatibility.")] NO_CATCH = 0x100, + + /// + /// Limit image cache size. + /// RENDER_LIMITEDIMAGECACHE = 0x200, + + /// + /// Always use halftone for image stretching. + /// RENDER_FORCEHALFTONE = 0x400, + + /// + /// Render for printing. + /// PRINTING = 0x800, - REVERSE_BYTE_ORDER = 0x10 + + /// + /// Set to disable anti-aliasing on text. This flag will also disable LCD optimization for text rendering. + /// + RENDER_NO_SMOOTHTEXT = 0x1000, + + /// + /// Set to disable anti-aliasing on images. + /// + RENDER_NO_SMOOTHIMAGE = 0x2000, + + /// + /// Set to disable anti-aliasing on paths. + /// + RENDER_NO_SMOOTHPATH = 0x4000, + + /// + /// Set whether to render in a reverse Byte order, this flag is only used when rendering to a bitmap. + /// + REVERSE_BYTE_ORDER = 0x10, + + /// + /// Set whether fill paths need to be stroked. This flag is only used when FPDF_COLORSCHEME is passed in, since with a single fill color for paths the boundaries of adjacent fill paths are less visible. + /// + CONVERT_FILL_TO_STROKE = 0x20 } public enum FPDF_ERR : uint diff --git a/src/PDFtoImage/PdfiumViewer/PdfBookmarkCollection.cs b/src/PDFtoImage/PdfiumViewer/PdfBookmarkCollection.cs index 6a23d144..296a8b33 100644 --- a/src/PDFtoImage/PdfiumViewer/PdfBookmarkCollection.cs +++ b/src/PDFtoImage/PdfiumViewer/PdfBookmarkCollection.cs @@ -11,7 +11,7 @@ internal sealed class PdfBookmark public PdfBookmark() { - Children = new PdfBookmarkCollection(); + Children = []; } } diff --git a/src/PDFtoImage/PdfiumViewer/PdfDocument.cs b/src/PDFtoImage/PdfiumViewer/PdfDocument.cs index 22166324..e47a7842 100644 --- a/src/PDFtoImage/PdfiumViewer/PdfDocument.cs +++ b/src/PDFtoImage/PdfiumViewer/PdfDocument.cs @@ -8,126 +8,125 @@ namespace PDFtoImage.PdfiumViewer { - /// - /// Provides functionality to render a PDF document. - /// - internal sealed class PdfDocument : IDisposable - { - private bool _disposed; - private PdfFile? _file; - - /// - /// Initializes a new instance of the PdfDocument class with the provided stream. - /// - /// Stream for the PDF document. - /// Password for the PDF document. - /// Decides if will closed on dispose as well. - public static PdfDocument Load(Stream stream, string? password, bool disposeStream) - { - if (stream == null) - throw new ArgumentNullException(nameof(stream)); - - return new PdfDocument(stream, password, disposeStream); - } - - /// - /// Size of each page in the PDF document. - /// - public IList PageSizes { get; private set; } - - private PdfDocument(Stream stream, string? password, bool disposeStream) - { - _file = new PdfFile(stream, password, disposeStream); - - var pageSizes = _file.GetPDFDocInfo() ?? throw new Win32Exception(); - PageSizes = new ReadOnlyCollection(pageSizes); - } - - /// - /// Renders a page of the PDF document to an image. - /// - /// Number of the page to render. - /// Width of the rendered image. - /// Height of the rendered image. - /// Horizontal DPI. - /// Vertical DPI. - /// Rotation. - /// Flags used to influence the rendering. - /// Render form fills. - /// The rendered image. - public SKBitmap Render(int page, int width, int height, float dpiX, float dpiY, PdfRotation rotate, PdfRenderFlags flags, bool renderFormFill) - { - if (_disposed) - throw new ObjectDisposedException(GetType().Name); - - if (rotate == PdfRotation.Rotate90 || rotate == PdfRotation.Rotate270) - { - (width, height) = (height, width); - (dpiX, dpiY) = (dpiY, dpiX); - } - - if ((flags & PdfRenderFlags.CorrectFromDpi) != 0) - { - width = width * (int)dpiX / 72; - height = height * (int)dpiY / 72; - } - - var bitmap = new SKBitmap(width, height, SKColorType.Bgra8888, SKAlphaType.Premul); - var handle = NativeMethods.FPDFBitmap_CreateEx(width, height, 4, bitmap.GetPixels(), width * 4); - - try - { - uint background = (flags & PdfRenderFlags.Transparent) == 0 ? 0xFFFFFFFF : 0x00FFFFFF; - - NativeMethods.FPDFBitmap_FillRect(handle, 0, 0, width, height, background); - - bool success = _file!.RenderPDFPageToBitmap( - page, - handle, - 0, 0, width, height, - (int)rotate, - FlagsToFPDFFlags(flags), - renderFormFill - ); - - if (!success) - throw new Win32Exception(); - } - finally - { - NativeMethods.FPDFBitmap_Destroy(handle); - } - - return bitmap; - } - - private static NativeMethods.FPDF FlagsToFPDFFlags(PdfRenderFlags flags) - { - return (NativeMethods.FPDF)(flags & ~(PdfRenderFlags.Transparent | PdfRenderFlags.CorrectFromDpi)); - } - - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// 2 - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// Whether this method is called from Dispose. - private void Dispose(bool disposing) - { - if (!_disposed && disposing) - { - if (_file != null) - { - _file.Dispose(); - _file = null; - } - - _disposed = true; - } - } - } +#if NET8_0_OR_GREATER +#pragma warning disable CA1510 // Use ArgumentNullException throw helper +#pragma warning disable CA1513 // Use ObjectDisposedException throw helper +#endif + /// + /// Provides functionality to render a PDF document. + /// + internal sealed class PdfDocument : IDisposable + { + private bool _disposed; + private PdfFile? _file; + + /// + /// Initializes a new instance of the PdfDocument class with the provided stream. + /// + /// Stream for the PDF document. + /// Password for the PDF document. + /// Decides if will closed on dispose as well. + public static PdfDocument Load(Stream stream, string? password, bool disposeStream) + { + if (stream == null) + throw new ArgumentNullException(nameof(stream)); + + return new PdfDocument(stream, password, disposeStream); + } + + /// + /// Size of each page in the PDF document. + /// + public IList PageSizes { get; private set; } + + private PdfDocument(Stream stream, string? password, bool disposeStream) + { + _file = new PdfFile(stream, password, disposeStream); + + var pageSizes = _file.GetPDFDocInfo() ?? throw new Win32Exception(); + PageSizes = new ReadOnlyCollection(pageSizes); + } + + /// + /// Renders a page of the PDF document to an image. + /// + /// Number of the page to render. + /// Width of the rendered image. + /// Height of the rendered image. + /// Horizontal DPI. + /// Vertical DPI. + /// Rotation. + /// Flags used to influence the rendering. + /// Render form fills. + /// Change and depending on the given and . + /// The background color used for the output. + /// The rendered image. + public SKBitmap Render(int page, int width, int height, float dpiX, float dpiY, PdfRotation rotate, NativeMethods.FPDF flags, bool renderFormFill, bool correctFromDpi, SKColor backgroundColor) + { + if (_disposed) + throw new ObjectDisposedException(GetType().Name); + + if (rotate == PdfRotation.Rotate90 || rotate == PdfRotation.Rotate270) + { + (width, height) = (height, width); + (dpiX, dpiY) = (dpiY, dpiX); + } + + if (correctFromDpi) + { + width = width * (int)dpiX / 72; + height = height * (int)dpiY / 72; + } + + var bitmap = new SKBitmap(width, height, SKColorType.Bgra8888, SKAlphaType.Premul); + var handle = NativeMethods.FPDFBitmap_CreateEx(width, height, 4, bitmap.GetPixels(), width * 4); + + try + { + NativeMethods.FPDFBitmap_FillRect(handle, 0, 0, width, height, (uint)backgroundColor); + + bool success = _file!.RenderPDFPageToBitmap( + page, + handle, + 0, 0, width, height, + (int)rotate, + flags, + renderFormFill + ); + + if (!success) + throw new Win32Exception(); + } + finally + { + NativeMethods.FPDFBitmap_Destroy(handle); + } + + return bitmap; + } + + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + /// 2 + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + /// Whether this method is called from Dispose. + private void Dispose(bool disposing) + { + if (!_disposed && disposing) + { + if (_file != null) + { + _file.Dispose(); + _file = null; + } + + _disposed = true; + } + } + } } \ No newline at end of file diff --git a/src/PDFtoImage/PdfiumViewer/PdfFile.cs b/src/PDFtoImage/PdfiumViewer/PdfFile.cs index 839ca92e..500a03cb 100644 --- a/src/PDFtoImage/PdfiumViewer/PdfFile.cs +++ b/src/PDFtoImage/PdfiumViewer/PdfFile.cs @@ -8,6 +8,11 @@ namespace PDFtoImage.PdfiumViewer { +#if NET8_0_OR_GREATER +#pragma warning disable CA1513 // Use ObjectDisposedException throw helper +#pragma warning disable IDE0056 // Use index operator +#pragma warning disable IDE0057 // Use range operator +#endif internal sealed class PdfFile : IDisposable { private IntPtr _document; @@ -55,15 +60,14 @@ public bool RenderPDFPageToBitmap(int pageNumber, IntPtr bitmapHandle, int bound if (_disposed) throw new ObjectDisposedException(GetType().Name); - using (var pageData = new PageData(_document, _form, pageNumber)) - { - NativeMethods.FPDF_RenderPageBitmap(bitmapHandle, pageData.Page, boundsOriginX, boundsOriginY, boundsWidth, boundsHeight, rotate, flags); + using var pageData = new PageData(_document, _form, pageNumber); - if (renderFormFill) - { - NativeMethods.FPDF_RemoveFormFieldHighlight(_form); - NativeMethods.FPDF_FFLDraw(_form, bitmapHandle, pageData.Page, boundsOriginX, boundsOriginY, boundsWidth, boundsHeight, rotate, flags); - } + NativeMethods.FPDF_RenderPageBitmap(bitmapHandle, pageData.Page, boundsOriginX, boundsOriginY, boundsWidth, boundsHeight, rotate, flags); + + if (renderFormFill) + { + NativeMethods.FPDF_RemoveFormFieldHighlight(_form); + NativeMethods.FPDF_FFLDraw(_form, bitmapHandle, pageData.Page, boundsOriginX, boundsOriginY, boundsWidth, boundsHeight, rotate, flags); } return true; @@ -119,7 +123,7 @@ private void LoadDocument(IntPtr document) NativeMethods.FORM_DoDocumentJSAction(_form); NativeMethods.FORM_DoDocumentOpenAction(_form); - Bookmarks = new PdfBookmarkCollection(); + Bookmarks = []; LoadBookmarks(Bookmarks, NativeMethods.FPDF_BookmarkGetFirstChild(document, IntPtr.Zero)); } diff --git a/src/PDFtoImage/PdfiumViewer/PdfLibrary.cs b/src/PDFtoImage/PdfiumViewer/PdfLibrary.cs index 865873d7..fc620df3 100644 --- a/src/PDFtoImage/PdfiumViewer/PdfLibrary.cs +++ b/src/PDFtoImage/PdfiumViewer/PdfLibrary.cs @@ -26,9 +26,9 @@ private PdfLibrary() Dispose(disposing: false); } - private void Dispose(bool disposing) - { - if (!disposedValue) + private void Dispose(bool disposing) + { + if (!disposedValue) { NativeMethods.FPDF_DestroyLibrary(); disposedValue = true; diff --git a/src/PDFtoImage/PdfiumViewer/PdfRenderFlags.cs b/src/PDFtoImage/PdfiumViewer/PdfRenderFlags.cs deleted file mode 100644 index 6d966176..00000000 --- a/src/PDFtoImage/PdfiumViewer/PdfRenderFlags.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; - -namespace PDFtoImage.PdfiumViewer -{ - /// - /// Flags that influence the page rendering process. - /// - [Flags] - internal enum PdfRenderFlags - { - /// - /// No flags. - /// - None = 0, - /// - /// Render for printing. - /// - ForPrinting = NativeMethods.FPDF.PRINTING, - /// - /// Set if annotations are to be rendered. - /// - Annotations = NativeMethods.FPDF.ANNOT, - /// - /// Set if using text rendering optimized for LCD display. - /// - LcdText = NativeMethods.FPDF.LCD_TEXT, - /// - /// Don't use the native text output available on some platforms. - /// - NoNativeText = NativeMethods.FPDF.NO_NATIVETEXT, - /// - /// Grayscale output. - /// - Grayscale = NativeMethods.FPDF.GRAYSCALE, - /// - /// Limit image cache size. - /// - LimitImageCacheSize = NativeMethods.FPDF.RENDER_LIMITEDIMAGECACHE, - /// - /// Always use halftone for image stretching. - /// - ForceHalftone = NativeMethods.FPDF.RENDER_FORCEHALFTONE, - /// - /// Render with a transparent background. - /// - Transparent = 0x1000, - /// - /// Correct height/width for DPI. - /// - CorrectFromDpi = 0x2000 - } -} \ No newline at end of file diff --git a/src/PDFtoImage/PdfiumViewer/StreamManager.cs b/src/PDFtoImage/PdfiumViewer/StreamManager.cs index 0bf5664c..d4f7156c 100644 --- a/src/PDFtoImage/PdfiumViewer/StreamManager.cs +++ b/src/PDFtoImage/PdfiumViewer/StreamManager.cs @@ -4,40 +4,43 @@ namespace PDFtoImage.PdfiumViewer { - internal static class StreamManager - { - private static readonly object _syncRoot = new(); - private static int _nextId = 1; - private static readonly Dictionary _files = new(); +#if NET8_0_OR_GREATER +#pragma warning disable CA1510 // Use ArgumentNullException throw helper +#endif + internal static class StreamManager + { + private static readonly object _syncRoot = new(); + private static int _nextId = 1; + private static readonly Dictionary _files = []; - public static int Register(Stream stream) - { - if (stream == null) - throw new ArgumentNullException(nameof(stream)); + public static int Register(Stream stream) + { + if (stream == null) + throw new ArgumentNullException(nameof(stream)); - lock (_syncRoot) - { - int id = _nextId++; - _files.Add(id, stream); - return id; - } - } + lock (_syncRoot) + { + int id = _nextId++; + _files.Add(id, stream); + return id; + } + } - public static void Unregister(int id) - { - lock (_syncRoot) - { - _files.Remove(id); - } - } + public static void Unregister(int id) + { + lock (_syncRoot) + { + _files.Remove(id); + } + } - public static Stream? Get(int id) - { - lock (_syncRoot) - { - _files.TryGetValue(id, out Stream? stream); - return stream; - } - } - } + public static Stream? Get(int id) + { + lock (_syncRoot) + { + _files.TryGetValue(id, out Stream? stream); + return stream; + } + } + } } \ No newline at end of file diff --git a/src/PDFtoImage/PublicAPI/monoandroid10.0/PublicAPI.Shipped.txt b/src/PDFtoImage/PublicAPI/monoandroid10.0/PublicAPI.Shipped.txt index 5a7c5eef..3236b830 100644 --- a/src/PDFtoImage/PublicAPI/monoandroid10.0/PublicAPI.Shipped.txt +++ b/src/PDFtoImage/PublicAPI/monoandroid10.0/PublicAPI.Shipped.txt @@ -1,23 +1,23 @@ #nullable enable PDFtoImage.Conversion -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void static PDFtoImage.Conversion.GetPageCount(byte[]! pdfAsByteArray, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(string! pdfAsBase64String, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, string? password = null) -> int @@ -27,20 +27,20 @@ static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, int page, static PDFtoImage.Conversion.GetPageSizes(byte[]! pdfAsByteArray, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(string! pdfAsBase64String, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! PDFtoImage.Resource PDFtoImage.Resource.Attribute PDFtoImage.Resource.Resource() -> void static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> int static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, bool leaveOpen, int page, string? password = null) -> System.Drawing.SizeF static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate0 = 0 -> PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate180 = 2 -> PDFtoImage.PdfRotation @@ -59,4 +59,10 @@ PDFtoImage.Exceptions.PdfPasswordProtectedException.PdfPasswordProtectedExceptio PDFtoImage.Exceptions.PdfUnknownException PDFtoImage.Exceptions.PdfUnknownException.PdfUnknownException() -> void PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException -PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void \ No newline at end of file +PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void +PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.None = 0 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Text = 1 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Images = 2 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Paths = 4 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.All = PDFtoImage.PdfAntiAliasing.Text | PDFtoImage.PdfAntiAliasing.Images | PDFtoImage.PdfAntiAliasing.Paths -> PDFtoImage.PdfAntiAliasing \ No newline at end of file diff --git a/src/PDFtoImage/PublicAPI/net462/PublicAPI.Shipped.txt b/src/PDFtoImage/PublicAPI/net462/PublicAPI.Shipped.txt index 58926d77..22f77390 100644 --- a/src/PDFtoImage/PublicAPI/net462/PublicAPI.Shipped.txt +++ b/src/PDFtoImage/PublicAPI/net462/PublicAPI.Shipped.txt @@ -1,23 +1,23 @@ #nullable enable PDFtoImage.Conversion -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void static PDFtoImage.Conversion.GetPageCount(byte[]! pdfAsByteArray, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(string! pdfAsBase64String, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, string? password = null) -> int @@ -27,17 +27,17 @@ static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, int page, static PDFtoImage.Conversion.GetPageSizes(byte[]! pdfAsByteArray, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(string! pdfAsBase64String, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> int static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, bool leaveOpen, int page, string? password = null) -> System.Drawing.SizeF static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate0 = 0 -> PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate180 = 2 -> PDFtoImage.PdfRotation @@ -56,4 +56,10 @@ PDFtoImage.Exceptions.PdfPasswordProtectedException.PdfPasswordProtectedExceptio PDFtoImage.Exceptions.PdfUnknownException PDFtoImage.Exceptions.PdfUnknownException.PdfUnknownException() -> void PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException -PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void \ No newline at end of file +PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void +PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.None = 0 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Text = 1 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Images = 2 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Paths = 4 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.All = PDFtoImage.PdfAntiAliasing.Text | PDFtoImage.PdfAntiAliasing.Images | PDFtoImage.PdfAntiAliasing.Paths -> PDFtoImage.PdfAntiAliasing \ No newline at end of file diff --git a/src/PDFtoImage/PublicAPI/net481/PublicAPI.Shipped.txt b/src/PDFtoImage/PublicAPI/net481/PublicAPI.Shipped.txt index 58926d77..22f77390 100644 --- a/src/PDFtoImage/PublicAPI/net481/PublicAPI.Shipped.txt +++ b/src/PDFtoImage/PublicAPI/net481/PublicAPI.Shipped.txt @@ -1,23 +1,23 @@ #nullable enable PDFtoImage.Conversion -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void static PDFtoImage.Conversion.GetPageCount(byte[]! pdfAsByteArray, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(string! pdfAsBase64String, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, string? password = null) -> int @@ -27,17 +27,17 @@ static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, int page, static PDFtoImage.Conversion.GetPageSizes(byte[]! pdfAsByteArray, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(string! pdfAsBase64String, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> int static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, bool leaveOpen, int page, string? password = null) -> System.Drawing.SizeF static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate0 = 0 -> PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate180 = 2 -> PDFtoImage.PdfRotation @@ -56,4 +56,10 @@ PDFtoImage.Exceptions.PdfPasswordProtectedException.PdfPasswordProtectedExceptio PDFtoImage.Exceptions.PdfUnknownException PDFtoImage.Exceptions.PdfUnknownException.PdfUnknownException() -> void PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException -PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void \ No newline at end of file +PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void +PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.None = 0 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Text = 1 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Images = 2 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Paths = 4 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.All = PDFtoImage.PdfAntiAliasing.Text | PDFtoImage.PdfAntiAliasing.Images | PDFtoImage.PdfAntiAliasing.Paths -> PDFtoImage.PdfAntiAliasing \ No newline at end of file diff --git a/src/PDFtoImage/PublicAPI/net6.0/PublicAPI.Shipped.txt b/src/PDFtoImage/PublicAPI/net6.0/PublicAPI.Shipped.txt index 7114b149..80946a18 100644 --- a/src/PDFtoImage/PublicAPI/net6.0/PublicAPI.Shipped.txt +++ b/src/PDFtoImage/PublicAPI/net6.0/PublicAPI.Shipped.txt @@ -1,23 +1,23 @@ #nullable enable PDFtoImage.Conversion -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void static PDFtoImage.Conversion.GetPageCount(byte[]! pdfAsByteArray, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(string! pdfAsBase64String, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, string? password = null) -> int @@ -27,21 +27,21 @@ static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, int page, static PDFtoImage.Conversion.GetPageSizes(byte[]! pdfAsByteArray, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(string! pdfAsBase64String, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> int static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, bool leaveOpen, int page, string? password = null) -> System.Drawing.SizeF static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate0 = 0 -> PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate180 = 2 -> PDFtoImage.PdfRotation @@ -60,4 +60,10 @@ PDFtoImage.Exceptions.PdfPasswordProtectedException.PdfPasswordProtectedExceptio PDFtoImage.Exceptions.PdfUnknownException PDFtoImage.Exceptions.PdfUnknownException.PdfUnknownException() -> void PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException -PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void \ No newline at end of file +PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void +PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.None = 0 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Text = 1 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Images = 2 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Paths = 4 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.All = PDFtoImage.PdfAntiAliasing.Text | PDFtoImage.PdfAntiAliasing.Images | PDFtoImage.PdfAntiAliasing.Paths -> PDFtoImage.PdfAntiAliasing \ No newline at end of file diff --git a/src/PDFtoImage/PublicAPI/net7.0-android/PublicAPI.Shipped.txt b/src/PDFtoImage/PublicAPI/net7.0-android/PublicAPI.Shipped.txt index 1940b5d5..c6f4503b 100644 --- a/src/PDFtoImage/PublicAPI/net7.0-android/PublicAPI.Shipped.txt +++ b/src/PDFtoImage/PublicAPI/net7.0-android/PublicAPI.Shipped.txt @@ -1,23 +1,23 @@ #nullable enable PDFtoImage.Conversion -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void static PDFtoImage.Conversion.GetPageCount(byte[]! pdfAsByteArray, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(string! pdfAsBase64String, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, string? password = null) -> int @@ -27,24 +27,24 @@ static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, int page, static PDFtoImage.Conversion.GetPageSizes(byte[]! pdfAsByteArray, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(string! pdfAsBase64String, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! PDFtoImage.Resource PDFtoImage.Resource.Attribute PDFtoImage.Resource.Resource() -> void static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> int static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, bool leaveOpen, int page, string? password = null) -> System.Drawing.SizeF static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate0 = 0 -> PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate180 = 2 -> PDFtoImage.PdfRotation @@ -63,4 +63,10 @@ PDFtoImage.Exceptions.PdfPasswordProtectedException.PdfPasswordProtectedExceptio PDFtoImage.Exceptions.PdfUnknownException PDFtoImage.Exceptions.PdfUnknownException.PdfUnknownException() -> void PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException -PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void \ No newline at end of file +PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void +PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.None = 0 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Text = 1 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Images = 2 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Paths = 4 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.All = PDFtoImage.PdfAntiAliasing.Text | PDFtoImage.PdfAntiAliasing.Images | PDFtoImage.PdfAntiAliasing.Paths -> PDFtoImage.PdfAntiAliasing \ No newline at end of file diff --git a/src/PDFtoImage/PublicAPI/net7.0/PublicAPI.Shipped.txt b/src/PDFtoImage/PublicAPI/net7.0/PublicAPI.Shipped.txt index 7114b149..80946a18 100644 --- a/src/PDFtoImage/PublicAPI/net7.0/PublicAPI.Shipped.txt +++ b/src/PDFtoImage/PublicAPI/net7.0/PublicAPI.Shipped.txt @@ -1,23 +1,23 @@ #nullable enable PDFtoImage.Conversion -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void static PDFtoImage.Conversion.GetPageCount(byte[]! pdfAsByteArray, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(string! pdfAsBase64String, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, string? password = null) -> int @@ -27,21 +27,21 @@ static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, int page, static PDFtoImage.Conversion.GetPageSizes(byte[]! pdfAsByteArray, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(string! pdfAsBase64String, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> int static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, bool leaveOpen, int page, string? password = null) -> System.Drawing.SizeF static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate0 = 0 -> PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate180 = 2 -> PDFtoImage.PdfRotation @@ -60,4 +60,10 @@ PDFtoImage.Exceptions.PdfPasswordProtectedException.PdfPasswordProtectedExceptio PDFtoImage.Exceptions.PdfUnknownException PDFtoImage.Exceptions.PdfUnknownException.PdfUnknownException() -> void PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException -PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void \ No newline at end of file +PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void +PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.None = 0 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Text = 1 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Images = 2 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Paths = 4 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.All = PDFtoImage.PdfAntiAliasing.Text | PDFtoImage.PdfAntiAliasing.Images | PDFtoImage.PdfAntiAliasing.Paths -> PDFtoImage.PdfAntiAliasing \ No newline at end of file diff --git a/src/PDFtoImage/PublicAPI/net8.0-android/PublicAPI.Shipped.txt b/src/PDFtoImage/PublicAPI/net8.0-android/PublicAPI.Shipped.txt index 01d8cd4a..d09ba1b3 100644 --- a/src/PDFtoImage/PublicAPI/net8.0-android/PublicAPI.Shipped.txt +++ b/src/PDFtoImage/PublicAPI/net8.0-android/PublicAPI.Shipped.txt @@ -1,23 +1,23 @@ #nullable enable PDFtoImage.Conversion -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void static PDFtoImage.Conversion.GetPageCount(byte[]! pdfAsByteArray, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(string! pdfAsBase64String, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, string? password = null) -> int @@ -27,23 +27,23 @@ static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, int page, static PDFtoImage.Conversion.GetPageSizes(byte[]! pdfAsByteArray, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(string! pdfAsBase64String, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! PDFtoImage.Resource PDFtoImage.Resource.Resource() -> void static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> int static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, bool leaveOpen, int page, string? password = null) -> System.Drawing.SizeF static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate0 = 0 -> PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate180 = 2 -> PDFtoImage.PdfRotation @@ -62,4 +62,10 @@ PDFtoImage.Exceptions.PdfPasswordProtectedException.PdfPasswordProtectedExceptio PDFtoImage.Exceptions.PdfUnknownException PDFtoImage.Exceptions.PdfUnknownException.PdfUnknownException() -> void PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException -PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void \ No newline at end of file +PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void +PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.None = 0 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Text = 1 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Images = 2 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Paths = 4 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.All = PDFtoImage.PdfAntiAliasing.Text | PDFtoImage.PdfAntiAliasing.Images | PDFtoImage.PdfAntiAliasing.Paths -> PDFtoImage.PdfAntiAliasing \ No newline at end of file diff --git a/src/PDFtoImage/PublicAPI/net8.0/PublicAPI.Shipped.txt b/src/PDFtoImage/PublicAPI/net8.0/PublicAPI.Shipped.txt index 7114b149..80946a18 100644 --- a/src/PDFtoImage/PublicAPI/net8.0/PublicAPI.Shipped.txt +++ b/src/PDFtoImage/PublicAPI/net8.0/PublicAPI.Shipped.txt @@ -1,23 +1,23 @@ #nullable enable PDFtoImage.Conversion -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void -static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveJpeg(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SavePng(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(string! imageFilename, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void +static PDFtoImage.Conversion.SaveWebp(System.IO.Stream! imageStream, System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> void static PDFtoImage.Conversion.GetPageCount(byte[]! pdfAsByteArray, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(string! pdfAsBase64String, string? password = null) -> int static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, string? password = null) -> int @@ -27,21 +27,21 @@ static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, int page, static PDFtoImage.Conversion.GetPageSizes(byte[]! pdfAsByteArray, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(string! pdfAsBase64String, string? password = null) -> System.Collections.Generic.IList! static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(byte[]! pdfAsByteArray, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(string! pdfAsBase64String, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! static PDFtoImage.Conversion.GetPageCount(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> int static PDFtoImage.Conversion.GetPageSize(System.IO.Stream! pdfStream, bool leaveOpen, int page, string? password = null) -> System.Drawing.SizeF static PDFtoImage.Conversion.GetPageSizes(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null) -> System.Collections.Generic.IList! -static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> SkiaSharp.SKBitmap! -static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0) -> System.Collections.Generic.IEnumerable! -static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +static PDFtoImage.Conversion.ToImage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> SkiaSharp.SKBitmap! +static PDFtoImage.Conversion.ToImages(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable! +static PDFtoImage.Conversion.ToImagesAsync(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 300, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, bool withAspectRatio = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate0 = 0 -> PDFtoImage.PdfRotation PDFtoImage.PdfRotation.Rotate180 = 2 -> PDFtoImage.PdfRotation @@ -60,4 +60,10 @@ PDFtoImage.Exceptions.PdfPasswordProtectedException.PdfPasswordProtectedExceptio PDFtoImage.Exceptions.PdfUnknownException PDFtoImage.Exceptions.PdfUnknownException.PdfUnknownException() -> void PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException -PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void \ No newline at end of file +PDFtoImage.Exceptions.PdfUnsupportedSecuritySchemeException.PdfUnsupportedSecuritySchemeException() -> void +PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.None = 0 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Text = 1 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Images = 2 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.Paths = 4 -> PDFtoImage.PdfAntiAliasing +PDFtoImage.PdfAntiAliasing.All = PDFtoImage.PdfAntiAliasing.Text | PDFtoImage.PdfAntiAliasing.Images | PDFtoImage.PdfAntiAliasing.Paths -> PDFtoImage.PdfAntiAliasing \ No newline at end of file diff --git a/src/Tests/AntiAliasingTests.cs b/src/Tests/AntiAliasingTests.cs new file mode 100644 index 00000000..9bf120ce --- /dev/null +++ b/src/Tests/AntiAliasingTests.cs @@ -0,0 +1,120 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using PDFtoImage; +using System; +using System.IO; +using System.Text; +using static PDFtoImage.Conversion; +using static PDFtoImage.Tests.TestUtils; + +namespace Tests +{ + [TestClass] + public class AntiAliasingTests + { + [TestInitialize] + public void Initialize() + { +#if NET6_0_OR_GREATER + if (!OperatingSystem.IsWindows() && !OperatingSystem.IsLinux() && !OperatingSystem.IsMacOS()) + Assert.Inconclusive("This test must run on Windows, Linux or macOS."); +#endif + } + + [TestMethod] + [DataRow(null, DisplayName = "Default (None)")] + [DataRow(PdfAntiAliasing.None, DisplayName = "None")] + [DataRow(PdfAntiAliasing.Text, DisplayName = "Text")] + [DataRow(PdfAntiAliasing.Images, DisplayName = "Images")] + [DataRow(PdfAntiAliasing.Paths, DisplayName = "Paths")] + [DataRow(PdfAntiAliasing.Text | PdfAntiAliasing.Images, DisplayName = "Text | Images")] + [DataRow(PdfAntiAliasing.Text | PdfAntiAliasing.Paths, DisplayName = "Text | Paths")] + [DataRow(PdfAntiAliasing.Images | PdfAntiAliasing.Paths, DisplayName = "Images | Paths")] + [DataRow(PdfAntiAliasing.Text | PdfAntiAliasing.Images | PdfAntiAliasing.Paths, DisplayName = "Text | Images | Paths")] + [DataRow(PdfAntiAliasing.All, DisplayName = "All")] + public void SaveJpegWithAntiAliasing(PdfAntiAliasing? antiAliasing) + { + var expectedPath = Path.Combine("Assets", "Expected", GetPlatformAsString(), "AntiAliasing", $"hundesteuer-anmeldung_{GetFileName(antiAliasing ?? PdfAntiAliasing.All)}.jpg"); + + using var inputStream = GetInputStream(Path.Combine("Assets", "hundesteuer-anmeldung.pdf")); + using var outputStream = CreateOutputStream(expectedPath); + + if (antiAliasing == null) + SaveJpeg(outputStream, inputStream, dpi: 40); + else + SaveJpeg(outputStream, inputStream, dpi: 40, antiAliasing: antiAliasing.Value); + + CompareStreams(expectedPath, outputStream); + } + + [TestMethod] + [DataRow(null, DisplayName = "Default (None)")] + [DataRow(PdfAntiAliasing.None, DisplayName = "None")] + [DataRow(PdfAntiAliasing.Text, DisplayName = "Text")] + [DataRow(PdfAntiAliasing.Images, DisplayName = "Images")] + [DataRow(PdfAntiAliasing.Paths, DisplayName = "Paths")] + [DataRow(PdfAntiAliasing.Text | PdfAntiAliasing.Images, DisplayName = "Text | Images")] + [DataRow(PdfAntiAliasing.Text | PdfAntiAliasing.Paths, DisplayName = "Text | Paths")] + [DataRow(PdfAntiAliasing.Images | PdfAntiAliasing.Paths, DisplayName = "Images | Paths")] + [DataRow(PdfAntiAliasing.Text | PdfAntiAliasing.Images | PdfAntiAliasing.Paths, DisplayName = "Text | Images | Paths")] + [DataRow(PdfAntiAliasing.All, DisplayName = "All")] + public void SavePngWithAntiAliasing(PdfAntiAliasing? antiAliasing) + { + var expectedPath = Path.Combine("Assets", "Expected", GetPlatformAsString(), "AntiAliasing", $"hundesteuer-anmeldung_{GetFileName(antiAliasing ?? PdfAntiAliasing.All)}.png"); + + using var inputStream = GetInputStream(Path.Combine("Assets", "hundesteuer-anmeldung.pdf")); + using var outputStream = CreateOutputStream(expectedPath); + + if (antiAliasing == null) + SavePng(outputStream, inputStream, dpi: 40); + else + SavePng(outputStream, inputStream, dpi: 40, antiAliasing: antiAliasing.Value); + + CompareStreams(expectedPath, outputStream); + } + + [TestMethod] + [DataRow(null, DisplayName = "Default (None)")] + [DataRow(PdfAntiAliasing.None, DisplayName = "None")] + [DataRow(PdfAntiAliasing.Text, DisplayName = "Text")] + [DataRow(PdfAntiAliasing.Images, DisplayName = "Images")] + [DataRow(PdfAntiAliasing.Paths, DisplayName = "Paths")] + [DataRow(PdfAntiAliasing.Text | PdfAntiAliasing.Images, DisplayName = "Text | Images")] + [DataRow(PdfAntiAliasing.Text | PdfAntiAliasing.Paths, DisplayName = "Text | Paths")] + [DataRow(PdfAntiAliasing.Images | PdfAntiAliasing.Paths, DisplayName = "Images | Paths")] + [DataRow(PdfAntiAliasing.Text | PdfAntiAliasing.Images | PdfAntiAliasing.Paths, DisplayName = "Text | Images | Paths")] + [DataRow(PdfAntiAliasing.All, DisplayName = "All")] + public void SaveWebpWithAntiAliasing(PdfAntiAliasing? antiAliasing) + { + var expectedPath = Path.Combine("Assets", "Expected", GetPlatformAsString(), "AntiAliasing", $"hundesteuer-anmeldung_{GetFileName(antiAliasing ?? PdfAntiAliasing.All)}.webp"); + + using var inputStream = GetInputStream(Path.Combine("Assets", "hundesteuer-anmeldung.pdf")); + using var outputStream = CreateOutputStream(expectedPath); + + if (antiAliasing == null) + SaveWebp(outputStream, inputStream, dpi: 40); + else + SaveWebp(outputStream, inputStream, dpi: 40, antiAliasing: antiAliasing.Value); + + CompareStreams(expectedPath, outputStream); + } + + private static string GetFileName(PdfAntiAliasing antiAliasing) + { + if (antiAliasing == PdfAntiAliasing.None) + return "aliasing_none"; + + var sb = new StringBuilder("aliasing"); + + if (antiAliasing.HasFlag(PdfAntiAliasing.Text)) + sb.Append("_text"); + + if (antiAliasing.HasFlag(PdfAntiAliasing.Images)) + sb.Append("_images"); + + if (antiAliasing.HasFlag(PdfAntiAliasing.Paths)) + sb.Append("_paths"); + + return sb.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images.jpg b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images.jpg new file mode 100644 index 00000000..6041eae8 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images.png b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images.png new file mode 100644 index 00000000..4a5e1127 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images.webp b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images.webp new file mode 100644 index 00000000..05c916a1 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images_paths.jpg b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images_paths.jpg new file mode 100644 index 00000000..f7a75794 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images_paths.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images_paths.png b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images_paths.png new file mode 100644 index 00000000..7462b4ad Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images_paths.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images_paths.webp b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images_paths.webp new file mode 100644 index 00000000..d577c500 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_images_paths.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_none.jpg b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_none.jpg new file mode 100644 index 00000000..6041eae8 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_none.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_none.png b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_none.png new file mode 100644 index 00000000..4a5e1127 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_none.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_none.webp b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_none.webp new file mode 100644 index 00000000..05c916a1 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_none.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_paths.jpg b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_paths.jpg new file mode 100644 index 00000000..f7a75794 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_paths.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_paths.png b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_paths.png new file mode 100644 index 00000000..7462b4ad Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_paths.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_paths.webp b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_paths.webp new file mode 100644 index 00000000..d577c500 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_paths.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text.jpg b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text.jpg new file mode 100644 index 00000000..656bebd4 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text.png b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text.png new file mode 100644 index 00000000..c7780065 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text.webp b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text.webp new file mode 100644 index 00000000..a9071550 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images.jpg b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images.jpg new file mode 100644 index 00000000..656bebd4 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images.png b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images.png new file mode 100644 index 00000000..c7780065 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images.webp b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images.webp new file mode 100644 index 00000000..a9071550 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images_paths.jpg b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images_paths.jpg new file mode 100644 index 00000000..d45c0dc9 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images_paths.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images_paths.png b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images_paths.png new file mode 100644 index 00000000..d5ea3619 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images_paths.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images_paths.webp b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images_paths.webp new file mode 100644 index 00000000..0e839da8 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_images_paths.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_paths.jpg b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_paths.jpg new file mode 100644 index 00000000..d45c0dc9 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_paths.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_paths.png b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_paths.png new file mode 100644 index 00000000..d5ea3619 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_paths.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_paths.webp b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_paths.webp new file mode 100644 index 00000000..0e839da8 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/AntiAliasing/hundesteuer-anmeldung_aliasing_text_paths.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#00ffffff.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#00ffffff.jpg new file mode 100644 index 00000000..d589ce9c Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#00ffffff.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#00ffffff.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#00ffffff.png new file mode 100644 index 00000000..97ff7f19 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#00ffffff.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#00ffffff.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#00ffffff.webp new file mode 100644 index 00000000..f880076e Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#00ffffff.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64000000.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64000000.jpg new file mode 100644 index 00000000..0a31de86 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64000000.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64000000.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64000000.png new file mode 100644 index 00000000..70605cbd Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64000000.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64000000.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64000000.webp new file mode 100644 index 00000000..07a5e5b4 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64000000.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#640000ff.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#640000ff.jpg new file mode 100644 index 00000000..2e58ae37 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#640000ff.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#640000ff.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#640000ff.png new file mode 100644 index 00000000..63bdaa96 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#640000ff.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#640000ff.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#640000ff.webp new file mode 100644 index 00000000..ebb4c5ce Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#640000ff.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ff00.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ff00.jpg new file mode 100644 index 00000000..e4be508e Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ff00.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ff00.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ff00.png new file mode 100644 index 00000000..2986fe55 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ff00.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ff00.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ff00.webp new file mode 100644 index 00000000..503d3bfd Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ff00.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ffff.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ffff.jpg new file mode 100644 index 00000000..38e7878c Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ffff.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ffff.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ffff.png new file mode 100644 index 00000000..b576dac0 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ffff.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ffff.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ffff.webp new file mode 100644 index 00000000..c160ecd5 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#6400ffff.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff0000.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff0000.jpg new file mode 100644 index 00000000..50dd179a Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff0000.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff0000.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff0000.png new file mode 100644 index 00000000..afb1922d Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff0000.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff0000.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff0000.webp new file mode 100644 index 00000000..f58b9856 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff0000.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff00ff.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff00ff.jpg new file mode 100644 index 00000000..4c3ff100 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff00ff.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff00ff.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff00ff.png new file mode 100644 index 00000000..bdff5ede Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff00ff.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff00ff.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff00ff.webp new file mode 100644 index 00000000..a94be690 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ff00ff.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffff00.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffff00.jpg new file mode 100644 index 00000000..c90ae0b2 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffff00.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffff00.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffff00.png new file mode 100644 index 00000000..20699997 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffff00.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffff00.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffff00.webp new file mode 100644 index 00000000..4a774686 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffff00.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffffff.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffffff.jpg new file mode 100644 index 00000000..3317e367 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffffff.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffffff.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffffff.png new file mode 100644 index 00000000..177c3497 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffffff.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffffff.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffffff.webp new file mode 100644 index 00000000..0547b5bb Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#64ffffff.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff000000.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff000000.jpg new file mode 100644 index 00000000..afe34b62 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff000000.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff000000.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff000000.png new file mode 100644 index 00000000..5d9c1f19 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff000000.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff000000.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff000000.webp new file mode 100644 index 00000000..58344304 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff000000.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff0000ff.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff0000ff.jpg new file mode 100644 index 00000000..b3d534aa Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff0000ff.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff0000ff.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff0000ff.png new file mode 100644 index 00000000..4742c0a5 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff0000ff.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff0000ff.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff0000ff.webp new file mode 100644 index 00000000..a8de3434 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff0000ff.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ff00.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ff00.jpg new file mode 100644 index 00000000..5b3ecaf1 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ff00.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ff00.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ff00.png new file mode 100644 index 00000000..6ac65f3c Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ff00.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ff00.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ff00.webp new file mode 100644 index 00000000..9f61c9f6 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ff00.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ffff.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ffff.jpg new file mode 100644 index 00000000..4deff5fd Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ffff.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ffff.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ffff.png new file mode 100644 index 00000000..f3fcdaad Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ffff.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ffff.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ffff.webp new file mode 100644 index 00000000..1554bacd Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ff00ffff.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff0000.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff0000.jpg new file mode 100644 index 00000000..02fd3277 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff0000.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff0000.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff0000.png new file mode 100644 index 00000000..8e34a6c2 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff0000.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff0000.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff0000.webp new file mode 100644 index 00000000..afdf9e7a Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff0000.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff00ff.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff00ff.jpg new file mode 100644 index 00000000..c3ee9afb Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff00ff.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff00ff.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff00ff.png new file mode 100644 index 00000000..1e5cb777 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff00ff.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff00ff.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff00ff.webp new file mode 100644 index 00000000..d6d968cf Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffff00ff.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffff00.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffff00.jpg new file mode 100644 index 00000000..75045bc9 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffff00.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffff00.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffff00.png new file mode 100644 index 00000000..35180344 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffff00.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffff00.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffff00.webp new file mode 100644 index 00000000..44e607ec Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffff00.webp differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffffff.jpg b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffffff.jpg new file mode 100644 index 00000000..d45c0dc9 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffffff.jpg differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffffff.png b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffffff.png new file mode 100644 index 00000000..d5ea3619 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffffff.png differ diff --git a/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffffff.webp b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffffff.webp new file mode 100644 index 00000000..0e839da8 Binary files /dev/null and b/src/Tests/Assets/Expected/WINDOWS/BackgroundColor/hundesteuer-anmeldung_#ffffffff.webp differ diff --git a/src/Tests/BackgroundColorTests.cs b/src/Tests/BackgroundColorTests.cs new file mode 100644 index 00000000..cb2c2163 --- /dev/null +++ b/src/Tests/BackgroundColorTests.cs @@ -0,0 +1,126 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using SkiaSharp; +using System; +using System.IO; +using static PDFtoImage.Conversion; +using static PDFtoImage.Tests.TestUtils; + +namespace Tests +{ + [TestClass] + public class BackgroundColorTests + { + [TestInitialize] + public void Initialize() + { +#if NET6_0_OR_GREATER + if (!OperatingSystem.IsWindows() && !OperatingSystem.IsLinux() && !OperatingSystem.IsMacOS()) + Assert.Inconclusive("This test must run on Windows, Linux or macOS."); +#endif + } + + [TestMethod] + [DataRow(null, DisplayName = "Default (White)")] + [DataRow((uint)0xFFFFFFFF, DisplayName = "White")] + [DataRow((uint)0x64FFFFFF, DisplayName = "White (100 alpha)")] + [DataRow((uint)0xFFFF0000, DisplayName = "Red")] + [DataRow((uint)0x64FF0000, DisplayName = "Red (100 alpha)")] + [DataRow((uint)0xFF00FF00, DisplayName = "Green")] + [DataRow((uint)0x6400FF00, DisplayName = "Green (100 alpha)")] + [DataRow((uint)0xFF0000FF, DisplayName = "Blue")] + [DataRow((uint)0x640000FF, DisplayName = "Blue (100 alpha)")] + [DataRow((uint)0xFFFFFF00, DisplayName = "Yellow")] + [DataRow((uint)0x64FFFF00, DisplayName = "Yellow (100 alpha)")] + [DataRow((uint)0xFFFF00FF, DisplayName = "Magenta")] + [DataRow((uint)0x64FF00FF, DisplayName = "Magenta (100 alpha)")] + [DataRow((uint)0xFF00FFFF, DisplayName = "Cyan")] + [DataRow((uint)0x6400FFFF, DisplayName = "Cyan (100 alpha)")] + [DataRow((uint)0xFF000000, DisplayName = "Black")] + [DataRow((uint)0x64000000, DisplayName = "Black (100 alpha)")] + [DataRow((uint)0x00FFFFFF, DisplayName = "Transparent")] + public void SaveJpegWithBackgroundColor(uint? backgroundColor) + { + var expectedPath = Path.Combine("Assets", "Expected", GetPlatformAsString(), "BackgroundColor", $"hundesteuer-anmeldung_{GetFileName(backgroundColor ?? SKColors.White)}.jpg"); + + using var inputStream = GetInputStream(Path.Combine("Assets", "hundesteuer-anmeldung.pdf")); + using var outputStream = CreateOutputStream(expectedPath); + + if (backgroundColor == null) + SaveJpeg(outputStream, inputStream, dpi: 40); + else + SaveJpeg(outputStream, inputStream, dpi: 40, backgroundColor: backgroundColor.Value); + + CompareStreams(expectedPath, outputStream); + } + + [TestMethod] + [DataRow(null, DisplayName = "Default (White)")] + [DataRow((uint)0xFFFFFFFF, DisplayName = "White")] + [DataRow((uint)0x64FFFFFF, DisplayName = "White (100 alpha)")] + [DataRow((uint)0xFFFF0000, DisplayName = "Red")] + [DataRow((uint)0x64FF0000, DisplayName = "Red (100 alpha)")] + [DataRow((uint)0xFF00FF00, DisplayName = "Green")] + [DataRow((uint)0x6400FF00, DisplayName = "Green (100 alpha)")] + [DataRow((uint)0xFF0000FF, DisplayName = "Blue")] + [DataRow((uint)0x640000FF, DisplayName = "Blue (100 alpha)")] + [DataRow((uint)0xFFFFFF00, DisplayName = "Yellow")] + [DataRow((uint)0x64FFFF00, DisplayName = "Yellow (100 alpha)")] + [DataRow((uint)0xFFFF00FF, DisplayName = "Magenta")] + [DataRow((uint)0x64FF00FF, DisplayName = "Magenta (100 alpha)")] + [DataRow((uint)0xFF00FFFF, DisplayName = "Cyan")] + [DataRow((uint)0x6400FFFF, DisplayName = "Cyan (100 alpha)")] + [DataRow((uint)0xFF000000, DisplayName = "Black")] + [DataRow((uint)0x64000000, DisplayName = "Black (100 alpha)")] + [DataRow((uint)0x00FFFFFF, DisplayName = "Transparent")] + public void SavePngWithBackgroundColor(uint? backgroundColor) + { + var expectedPath = Path.Combine("Assets", "Expected", GetPlatformAsString(), "BackgroundColor", $"hundesteuer-anmeldung_{GetFileName(backgroundColor ?? SKColors.White)}.png"); + + using var inputStream = GetInputStream(Path.Combine("Assets", "hundesteuer-anmeldung.pdf")); + using var outputStream = CreateOutputStream(expectedPath); + + if (backgroundColor == null) + SavePng(outputStream, inputStream, dpi: 40); + else + SavePng(outputStream, inputStream, dpi: 40, backgroundColor: backgroundColor.Value); + + CompareStreams(expectedPath, outputStream); + } + + [TestMethod] + [DataRow(null, DisplayName = "Default (White)")] + [DataRow((uint)0xFFFFFFFF, DisplayName = "White")] + [DataRow((uint)0x64FFFFFF, DisplayName = "White (100 alpha)")] + [DataRow((uint)0xFFFF0000, DisplayName = "Red")] + [DataRow((uint)0x64FF0000, DisplayName = "Red (100 alpha)")] + [DataRow((uint)0xFF00FF00, DisplayName = "Green")] + [DataRow((uint)0x6400FF00, DisplayName = "Green (100 alpha)")] + [DataRow((uint)0xFF0000FF, DisplayName = "Blue")] + [DataRow((uint)0x640000FF, DisplayName = "Blue (100 alpha)")] + [DataRow((uint)0xFFFFFF00, DisplayName = "Yellow")] + [DataRow((uint)0x64FFFF00, DisplayName = "Yellow (100 alpha)")] + [DataRow((uint)0xFFFF00FF, DisplayName = "Magenta")] + [DataRow((uint)0x64FF00FF, DisplayName = "Magenta (100 alpha)")] + [DataRow((uint)0xFF00FFFF, DisplayName = "Cyan")] + [DataRow((uint)0x6400FFFF, DisplayName = "Cyan (100 alpha)")] + [DataRow((uint)0xFF000000, DisplayName = "Black")] + [DataRow((uint)0x64000000, DisplayName = "Black (100 alpha)")] + [DataRow((uint)0x00FFFFFF, DisplayName = "Transparent")] + public void SaveWebpWithBackgroundColor(uint? backgroundColor) + { + var expectedPath = Path.Combine("Assets", "Expected", GetPlatformAsString(), "BackgroundColor", $"hundesteuer-anmeldung_{GetFileName(backgroundColor ?? SKColors.White)}.webp"); + + using var inputStream = GetInputStream(Path.Combine("Assets", "hundesteuer-anmeldung.pdf")); + using var outputStream = CreateOutputStream(expectedPath); + + if (backgroundColor == null) + SaveWebp(outputStream, inputStream, dpi: 40); + else + SaveWebp(outputStream, inputStream, dpi: 40, backgroundColor: backgroundColor.Value); + + CompareStreams(expectedPath, outputStream); + } + + private static string GetFileName(SKColor backgroundColor) => backgroundColor.ToString(); + } +} \ No newline at end of file diff --git a/src/Tests/Tests.csproj b/src/Tests/Tests.csproj index a184b014..0c42b2c9 100644 --- a/src/Tests/Tests.csproj +++ b/src/Tests/Tests.csproj @@ -836,6 +836,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -1088,6 +1112,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3841,6 +3916,78 @@ Always + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + Always @@ -4561,6 +4708,159 @@ Always + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + Always diff --git a/src/WebConverter/Client/Program.cs b/src/WebConverter/Client/Program.cs index 08fa9379..6b6daaf1 100644 --- a/src/WebConverter/Client/Program.cs +++ b/src/WebConverter/Client/Program.cs @@ -11,47 +11,42 @@ namespace PDFtoImage.WebConverter { - public class Program - { - public static event EventHandler? FilesHandled; - - public static async Task Main(string[] args) - { - var builder = WebAssemblyHostBuilder.CreateDefault(args); - builder.RootComponents.Add("#app"); - builder.RootComponents.Add("head::after"); - - builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); - builder.Services.AddFileHandlingService(); - builder.Services.AddWebShareService(); - - var host = builder.Build(); - - if (host.Services.GetService() is FileHandlingService service && await service.IsSupportedAsync()) - { - await service.SetConsumerAsync(async (launchParams) => - { - if (launchParams == null || !launchParams.Files.Any()) - return; - - if (launchParams.Files[0] is FileSystemFileHandle fileSystemFileHandle) - { - FilesHandled?.Invoke(null, new HandledFileEventArgs(await fileSystemFileHandle.GetFileAsync())); - } - }); - } - - await host.RunAsync(); - } - - public class HandledFileEventArgs : EventArgs - { - public KristofferStrube.Blazor.FileAPI.File File { get; } - - public HandledFileEventArgs(KristofferStrube.Blazor.FileAPI.File file) - { - File = file; - } - } - } + public class Program + { + public static event EventHandler? FilesHandled; + + public static async Task Main(string[] args) + { + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add("#app"); + builder.RootComponents.Add("head::after"); + + builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + builder.Services.AddFileHandlingService(); + builder.Services.AddWebShareService(); + + var host = builder.Build(); + + if (host.Services.GetService() is FileHandlingService service && await service.IsSupportedAsync()) + { + await service.SetConsumerAsync(async (launchParams) => + { + if (launchParams == null || !launchParams.Files.Any()) + return; + + if (launchParams.Files[0] is FileSystemFileHandle fileSystemFileHandle) + { + FilesHandled?.Invoke(null, new HandledFileEventArgs(await fileSystemFileHandle.GetFileAsync())); + } + }); + } + + await host.RunAsync(); + } + + public class HandledFileEventArgs(KristofferStrube.Blazor.FileAPI.File file) : EventArgs + { + public KristofferStrube.Blazor.FileAPI.File File { get; } = file; + } + } } \ No newline at end of file diff --git a/src/WebConverter/Models/RenderRequest.cs b/src/WebConverter/Models/RenderRequest.cs index cdd26655..317ed31e 100644 --- a/src/WebConverter/Models/RenderRequest.cs +++ b/src/WebConverter/Models/RenderRequest.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Components.Forms; +using KristofferStrube.Blazor.FileSystem; +using Microsoft.AspNetCore.Components.Forms; using SkiaSharp; using System; using System.ComponentModel.DataAnnotations; @@ -6,103 +7,118 @@ namespace PDFtoImage.WebConverter.Models { - public class RenderRequest : IDisposable - { - public static readonly SKEncodedImageFormat[] FormatWhitelist = new[] - { - SKEncodedImageFormat.Png, - SKEncodedImageFormat.Jpeg, - SKEncodedImageFormat.Webp - }; - - private bool disposedValue; - - [Required(ErrorMessage = "Select a PDF file to convert.")] - public IBrowserFile? File { get; set; } - - public string? Password { get; set; } - - [Required] - public SKEncodedImageFormat Format { get; set; } = SKEncodedImageFormat.Png; - - [Required] - [Range(0, 100, ErrorMessage = "Quality invalid (1-100).")] - public int Quality { get; set; } = 100; - - [Range(1, int.MaxValue, ErrorMessage = "Width invalid (≥0).")] - public int? Width { get; set; } = null; - - [Range(1, int.MaxValue, ErrorMessage = "Height invalid (≥0).")] - public int? Height { get; set; } = null; - - [Required] - [Range(1, int.MaxValue, ErrorMessage = "DPI invalid (≥0).")] - public int Dpi { get; set; } = 300; - - [Required] - [Range(0, int.MaxValue, ErrorMessage = "Page number invalid (≥0).")] - public int Page { get; set; } = 0; - - [Required] - public bool WithAnnotations { get; set; } = true; - - [Required] - public bool WithFormFill { get; set; } = true; - - [Required] - public bool WithAspectRatio { get; set; } = true; - - [Required] - public PdfRotation Rotation { get; set; } = PdfRotation.Rotate0; - - public static string GetRotationLocalized(PdfRotation rotation) => rotation switch - { - PdfRotation.Rotate0 => "0°", - PdfRotation.Rotate90 => "90°", - PdfRotation.Rotate180 => "180°", - PdfRotation.Rotate270 => "270°", - _ => throw new ArgumentOutOfRangeException(nameof(rotation)) - }; - - public static string GetMimeType(SKEncodedImageFormat format) => format switch - { - SKEncodedImageFormat.Png => "image/png", - SKEncodedImageFormat.Jpeg => "image/jpeg", - SKEncodedImageFormat.Webp => "image/webp", - _ => throw new ArgumentOutOfRangeException(nameof(format)) - }; - - public static string GetOutputFileName(RenderRequest model) => $"{model.File!.Name}.{model.Format.ToString().ToLowerInvariant()}"; - - public Stream? Input { get; set; } - - public Stream? Output { get; set; } - - public override string ToString() - { - return $"{nameof(RenderRequest)} {nameof(File)}={File?.Name ?? ""}, {nameof(Password)}={(!string.IsNullOrEmpty(Password) ? "" : "")}, {nameof(Page)}={Page}, {nameof(Format)}={Format}, {nameof(Quality)}={Quality}, {nameof(Width)}={(Width != null ? Width.Value : "")}, {nameof(Height)}={(Height != null ? Height.Value : "")}, {nameof(Dpi)}={Dpi}, {nameof(Rotation)}={Rotation}, {nameof(WithAspectRatio)}={WithAspectRatio}, {nameof(WithAnnotations)}={WithAnnotations}, {nameof(WithFormFill)}={WithFormFill}"; - } - - protected virtual void Dispose(bool disposing) - { - if (!disposedValue) - { - if (disposing) - { - Input?.Dispose(); - Input = null; - Output?.Dispose(); - Output = null; - } - - disposedValue = true; - } - } - - public void Dispose() - { - Dispose(disposing: true); - GC.SuppressFinalize(this); - } - } + public class RenderRequest : IDisposable + { + public static readonly SKEncodedImageFormat[] FormatWhitelist = + [ + SKEncodedImageFormat.Png, + SKEncodedImageFormat.Jpeg, + SKEncodedImageFormat.Webp + ]; + + private bool disposedValue; + + [Required(ErrorMessage = "Select a PDF file to convert.")] + public IBrowserFile? File { get; set; } + + public string? Password { get; set; } + + [Required] + public SKEncodedImageFormat Format { get; set; } = SKEncodedImageFormat.Png; + + [Required] + [Range(0, 100, ErrorMessage = "Quality invalid (1-100).")] + public int Quality { get; set; } = 100; + + [Range(1, int.MaxValue, ErrorMessage = "Width invalid (≥0).")] + public int? Width { get; set; } = null; + + [Range(1, int.MaxValue, ErrorMessage = "Height invalid (≥0).")] + public int? Height { get; set; } = null; + + [Required] + [Range(1, int.MaxValue, ErrorMessage = "DPI invalid (≥0).")] + public int Dpi { get; set; } = 300; + + [Required] + [Range(0, int.MaxValue, ErrorMessage = "Page number invalid (≥0).")] + public int Page { get; set; } = 0; + + [Required] + public bool WithAnnotations { get; set; } = true; + + [Required] + public bool WithFormFill { get; set; } = true; + + [Required] + public bool WithAspectRatio { get; set; } = true; + + [Required] + public bool AntiAliasingText { get; set; } = true; + + [Required] + public bool AntiAliasingImages { get; set; } = true; + + [Required] + public bool AntiAliasingPaths { get; set; } = true; + + [Required] + public string BackgroundColor { get; set; } = "#FFFFFF"; + + [Range(byte.MinValue, byte.MaxValue, ErrorMessage = "Opacity invalid (0-255).")] + public int Opacity { get; set; } = 255; + + [Required] + public PdfRotation Rotation { get; set; } = PdfRotation.Rotate0; + + public static string GetRotationLocalized(PdfRotation rotation) => rotation switch + { + PdfRotation.Rotate0 => "0°", + PdfRotation.Rotate90 => "90°", + PdfRotation.Rotate180 => "180°", + PdfRotation.Rotate270 => "270°", + _ => throw new ArgumentOutOfRangeException(nameof(rotation)) + }; + + public static string GetMimeType(SKEncodedImageFormat format) => format switch + { + SKEncodedImageFormat.Png => "image/png", + SKEncodedImageFormat.Jpeg => "image/jpeg", + SKEncodedImageFormat.Webp => "image/webp", + _ => throw new ArgumentOutOfRangeException(nameof(format)) + }; + + public static string GetOutputFileName(RenderRequest model) => $"{model.File!.Name}.{model.Format.ToString().ToLowerInvariant()}"; + + public Stream? Input { get; set; } + + public Stream? Output { get; set; } + + public override string ToString() + { + return $"{nameof(RenderRequest)} {nameof(File)}={File?.Name ?? ""}, {nameof(Password)}={(!string.IsNullOrEmpty(Password) ? "" : "")}, {nameof(Page)}={Page}, {nameof(Format)}={Format}, {nameof(Quality)}={Quality}, {nameof(Width)}={(Width != null ? Width.Value : "")}, {nameof(Height)}={(Height != null ? Height.Value : "")}, {nameof(Dpi)}={Dpi}, {nameof(Rotation)}={Rotation}, {nameof(WithAspectRatio)}={WithAspectRatio}, {nameof(WithAnnotations)}={WithAnnotations}, {nameof(WithFormFill)}={WithFormFill}"; + } + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + Input?.Dispose(); + Input = null; + Output?.Dispose(); + Output = null; + } + + disposedValue = true; + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + } } diff --git a/src/WebConverter/Pages/Index.razor b/src/WebConverter/Pages/Index.razor index 8869af0c..ccbbc8ef 100644 --- a/src/WebConverter/Pages/Index.razor +++ b/src/WebConverter/Pages/Index.razor @@ -147,12 +147,41 @@ - + Form fill + + + + + Anti-aliasing for text + + + + + Anti-aliasing for images + + + + + Anti-aliasing for paths + + + + + Background + + + + + Opacity + + + + diff --git a/src/WebConverter/Pages/Index.razor.cs b/src/WebConverter/Pages/Index.razor.cs index b78af3f5..680027e9 100644 --- a/src/WebConverter/Pages/Index.razor.cs +++ b/src/WebConverter/Pages/Index.razor.cs @@ -4,6 +4,7 @@ using PDFtoImage.WebConverter.Models; using SkiaSharp; using System; +using System.Globalization; using System.IO; using System.Linq; using System.Text.Json; @@ -135,6 +136,21 @@ private async Task Submit() Model.Input.Position = 0; SKBitmap? bitmap = null; bool encodeSuccess = false; + PdfAntiAliasing antiAliasing = default; + var backgroundColor = SKColors.White; + + if (Model.AntiAliasingText) + antiAliasing |= PdfAntiAliasing.Text; + if (Model.AntiAliasingImages) + antiAliasing |= PdfAntiAliasing.Images; + if (Model.AntiAliasingPaths) + antiAliasing |= PdfAntiAliasing.Paths; + + if (Model.BackgroundColor != null && Model.BackgroundColor.StartsWith('#') && uint.TryParse(Model.BackgroundColor[1..], NumberStyles.HexNumber, null, out var parsed)) + { + parsed += (uint)(Model.Opacity << 24); + backgroundColor = (SKColor)parsed; + } await Task.Factory.StartNew(() => { @@ -149,8 +165,9 @@ await Task.Factory.StartNew(() => withAnnotations: Model.WithAnnotations, withFormFill: Model.WithFormFill, withAspectRatio: Model.WithAspectRatio, - rotation: Model.Rotation - + rotation: Model.Rotation, + antiAliasing: antiAliasing, + backgroundColor: backgroundColor ); encodeSuccess = bitmap!.Encode(Model.Output, Model.Format, Model.Quality); }, TaskCreationOptions.LongRunning); @@ -212,7 +229,7 @@ private async Task ShareImage() var file = await JS.InvokeAsync("createFileFromStream", RenderRequest.GetOutputFileName(Model), RenderRequest.GetMimeType(Model.Format), streamRef); var data = new WebShareDataModel { - Files = new[] { file } + Files = [file] }; if (!await WebShareService.CanShareAsync(data)) diff --git a/src/WebConverter/Shared/NavMenu.razor b/src/WebConverter/Shared/NavMenu.razor index 04addb69..6e72677a 100644 --- a/src/WebConverter/Shared/NavMenu.razor +++ b/src/WebConverter/Shared/NavMenu.razor @@ -2,75 +2,76 @@ @inject IJSRuntime JS - - PDFtoImage Web Converter - - - - + + PDFtoImage Web Converter + + + + - - - - Conversion - - - - - Read me - - - - - Toggle theme - - - - GitHub - - - @SemanticVersion - - @if (!string.IsNullOrEmpty(CommitId)) - { - - @CommitIdShort - - } - + + + + Conversion + + + + + Read me + + + + + Toggle theme + + + + GitHub + + + @SemanticVersion + + @if (!string.IsNullOrEmpty(CommitId)) + { + + @CommitIdShort + + } + @code { - private bool collapseNavMenu = true; + private bool collapseNavMenu = true; - private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; + private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; - private void ToggleNavMenu() - { - collapseNavMenu = !collapseNavMenu; - } + private void ToggleNavMenu() + { + collapseNavMenu = !collapseNavMenu; + } - private const string GitHubUrl = "https://github.com/sungaila/PDFtoImage"; + private const string GitHubUrl = "https://github.com/sungaila/PDFtoImage"; - private static string? ProductVersion { get; set; } - private static string? SemanticVersion => $"v{ProductVersion?.Split('+', StringSplitOptions.RemoveEmptyEntries)?.First()}"; - private static string? ReleaseUrl => SemanticVersion != null ? $"{GitHubUrl}/releases/tag/{SemanticVersion}" : GitHubUrl; - private static string? CommitId => ProductVersion != null && ProductVersion.Contains('+') ? ProductVersion?.Split('+', StringSplitOptions.RemoveEmptyEntries)?.Last() : null; - private static string? CommitIdShort => CommitId?.Substring(0, Math.Min(7, CommitId.Length)); - private static string CommitUrl => CommitId != null ? $"{GitHubUrl}/commit/{CommitId}" : GitHubUrl; + private static string? ProductVersion { get; set; } + private static string? SemanticVersion => $"v{ProductVersion?.Split('+', StringSplitOptions.RemoveEmptyEntries)?.First()}"; + private static string? SemanticVersionWithoutSuffix => $"v{ProductVersion?.Split('+', StringSplitOptions.RemoveEmptyEntries)?.First()?.Split('-', StringSplitOptions.RemoveEmptyEntries)?.First()}"; + private static string? ReleaseUrl => SemanticVersionWithoutSuffix != null ? $"{GitHubUrl}/releases/tag/{SemanticVersionWithoutSuffix}" : GitHubUrl; + private static string? CommitId => ProductVersion != null && ProductVersion.Contains('+') ? ProductVersion?.Split('+', StringSplitOptions.RemoveEmptyEntries)?.Last() : null; + private static string? CommitIdShort => CommitId?.Substring(0, Math.Min(7, CommitId.Length)); + private static string CommitUrl => CommitId != null ? $"{GitHubUrl}/commit/{CommitId}" : GitHubUrl; - protected override void OnInitialized() - { - if (ProductVersion != null) - return; + protected override void OnInitialized() + { + if (ProductVersion != null) + return; - ProductVersion = typeof(MainLayout).Assembly.GetCustomAttribute()?.InformationalVersion; - } + ProductVersion = typeof(MainLayout).Assembly.GetCustomAttribute()?.InformationalVersion; + } - private async Task ToggleTheme() - { - await JS.InvokeVoidAsync("toggleTheme"); - } + private async Task ToggleTheme() + { + await JS.InvokeVoidAsync("toggleTheme"); + } } \ No newline at end of file diff --git a/src/WebConverter/WebConverter.csproj b/src/WebConverter/WebConverter.csproj index 6e1cb35e..6ef9385e 100644 --- a/src/WebConverter/WebConverter.csproj +++ b/src/WebConverter/WebConverter.csproj @@ -7,7 +7,8 @@ PDFtoImage.WebConverter PDFtoImage.WebConverter PDFtoImage.WebConverter.Program - 2.4.3 + 3.5.0 + true true true @@ -23,6 +24,11 @@ CA1416 + + + debug + + -O0 -g3 -s ASSERTIONS=2 -s SAFE_HEAP=0 -s STACK_OVERFLOW_CHECK=1 -s DEMANGLE_SUPPORT=1 @@ -33,8 +39,8 @@ - - + + diff --git a/src/WebConverter/pdfium.a b/src/WebConverter/pdfium.a index 74dfc296..d0cb19ee 100644 Binary files a/src/WebConverter/pdfium.a and b/src/WebConverter/pdfium.a differ