Skip to content

Commit c64100c

Browse files
author
yevgen-nykytenko
committed
Update content 2026-05-02 03:55:53
1 parent 8ed261d commit c64100c

153 files changed

Lines changed: 418 additions & 146 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

english/net/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: 10
55
url: /net/
66
description: GroupDocs.Conversion for .NET API References contain examples, code snippets, and API documentation. It provides namespaces, classes, interfaces, and other API details.
77
is_root: true
8-
version: "26.3"
8+
version: "26.6"
99
---
1010

1111
## Namespaces

english/net/groupdocs.conversion.options.convert/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The namespace provides classes to specify additional options for document conver
3030
| [JpegOptions](./jpegoptions) | Options for conversion to Jpeg file type. |
3131
| [JpgColorModes](./jpgcolormodes) | Describes Jpg color modes enumeration. |
3232
| [JpgCompressionMethods](./jpgcompressionmethods) | Describes Jpg compression modes |
33+
| [MarkdownImageSavingArgs](./markdownimagesavingargs) | Arguments passed to [`ImageSaving`](../groupdocs.conversion.options.convert/imarkdownimagesavingcallback/imagesaving). |
3334
| [MarkdownOptions](./markdownoptions) | Options for conversion to markdown file type. |
3435
| [NoConvertOptions](./noconvertoptions) | Special convert option class, which instructs converter to copy source document without any processing |
3536
| [PageDescriptionLanguageConvertOptions](./pagedescriptionlanguageconvertoptions) | Options for conversion to page descriptions language file type. |
@@ -70,6 +71,7 @@ The namespace provides classes to specify additional options for document conver
7071
| --- | --- |
7172
| [IConvertOptions](./iconvertoptions) | Represents convert options |
7273
| [IDpiConvertOptions](./idpiconvertoptions) | Represents convert options that support DPI (Dots Per Inch) settings. |
74+
| [IMarkdownImageSavingCallback](./imarkdownimagesavingcallback) | Handles custom processing of images while saving to Markdown. Invoked once per image; mutate [`MarkdownImageSavingArgs`](../groupdocs.conversion.options.convert/markdownimagesavingargs) to control the URI embedded in the Markdown output and/or redirect where the image bytes are written. |
7375
| [IPagedConvertOptions](./ipagedconvertoptions) | Represents convert options that allows conversion to perform page limitation by specifying start page and pages count |
7476
| [IPageRangedConvertOptions](./ipagerangedconvertoptions) | Represents convert options that support conversion of specific list of pages |
7577
| [IPasswordConvertOptions](./ipasswordconvertoptions) | Represents convert options that support password protection for converted documents. |

english/net/groupdocs.conversion.options.convert/imageconvertoptions/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: ImageConvertOptions
33
second_title: GroupDocs.Conversion for .NET API Reference
44
description: Options for conversion to Image file type.
55
type: docs
6-
weight: 1910
6+
weight: 1920
77
url: /net/groupdocs.conversion.options.convert/imageconvertoptions/
88
---
99
## ImageConvertOptions class

english/net/groupdocs.conversion.options.convert/imageflipmodes/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: ImageFlipModes
33
second_title: GroupDocs.Conversion for .NET API Reference
44
description: Describes image flip modes.
55
type: docs
6-
weight: 1920
6+
weight: 1930
77
url: /net/groupdocs.conversion.options.convert/imageflipmodes/
88
---
99
## ImageFlipModes class
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
title: IMarkdownImageSavingCallback
3+
second_title: GroupDocs.Conversion for .NET API Reference
4+
description: Handles custom processing of images while saving to Markdown. Invoked once per image mutate MarkdownImageSavingArgs./markdownimagesavingargs to control the URI embedded in the Markdown output and/or redirect where the image bytes are written.
5+
type: docs
6+
weight: 1840
7+
url: /net/groupdocs.conversion.options.convert/imarkdownimagesavingcallback/
8+
---
9+
## IMarkdownImageSavingCallback interface
10+
11+
Handles custom processing of images while saving to Markdown. Invoked once per image; mutate [`MarkdownImageSavingArgs`](../markdownimagesavingargs) to control the URI embedded in the Markdown output and/or redirect where the image bytes are written.
12+
13+
```csharp
14+
public interface IMarkdownImageSavingCallback
15+
```
16+
17+
## Methods
18+
19+
| Name | Description |
20+
| --- | --- |
21+
| [ImageSaving](../../groupdocs.conversion.options.convert/imarkdownimagesavingcallback/imagesaving)(MarkdownImageSavingArgs) | Called for each image being written to the Markdown document. |
22+
23+
### Examples
24+
25+
Scenario 1 — capture image bytes in memory and embed placeholder ids (useful when the caller wants to store images elsewhere or post-process them):
26+
27+
```csharp
28+
class CaptureImagesCallback : IMarkdownImageSavingCallback
29+
{
30+
private int _index;
31+
private readonly Dictionary<string, MemoryStream> _images;
32+
33+
public CaptureImagesCallback(Dictionary<string, MemoryStream> images) => _images = images;
34+
35+
public void ImageSaving(MarkdownImageSavingArgs args)
36+
{
37+
var id = $"image{_index++}";
38+
var buffer = new MemoryStream();
39+
_images[id] = buffer;
40+
args.ImageStream = buffer; // redirect image bytes into our buffer
41+
args.ImageFileName = id; // placeholder URI written into the .md
42+
args.KeepImageStreamOpen = true; // keep buffer readable after Convert() returns
43+
}
44+
}
45+
46+
var captured = new Dictionary<string, MemoryStream>();
47+
try
48+
{
49+
var options = new WordProcessingConvertOptions { Format = WordProcessingFileType.Md };
50+
options.MarkdownOptions.ImageSavingCallback = new CaptureImagesCallback(captured);
51+
52+
using var converter = new Converter("source.pdf");
53+
converter.Convert("output.md", options);
54+
// captured["image0"], captured["image1"], ... now hold the image bytes
55+
}
56+
finally
57+
{
58+
foreach (var s in captured.Values) s.Dispose(); // caller owns the streams
59+
}
60+
```
61+
62+
Scenario 2 — persist images to disk alongside the .md and reference them by file name:
63+
64+
```csharp
65+
class FileImagesCallback : IMarkdownImageSavingCallback
66+
{
67+
private readonly string _outputFolder;
68+
private int _index;
69+
70+
public FileImagesCallback(string outputFolder) => _outputFolder = outputFolder;
71+
72+
public void ImageSaving(MarkdownImageSavingArgs args)
73+
{
74+
var fileName = $"image{_index++}.png";
75+
args.ImageStream = new FileStream(Path.Combine(_outputFolder, fileName), FileMode.Create);
76+
args.ImageFileName = fileName; // written into the .md as ![](image0.png)
77+
// KeepImageStreamOpen left at default (false) → the converter flushes and closes the file.
78+
}
79+
}
80+
81+
var options = new WordProcessingConvertOptions { Format = WordProcessingFileType.Md };
82+
options.MarkdownOptions.ImageSavingCallback = new FileImagesCallback("./out");
83+
84+
using var converter = new Converter("source.pdf");
85+
converter.Convert("./out/output.md", options);
86+
// ./out/image0.png, ./out/image1.png, ... are written and closed by the converter.
87+
```
88+
89+
### See Also
90+
91+
* namespace [GroupDocs.Conversion.Options.Convert](../../groupdocs.conversion.options.convert)
92+
* assembly [GroupDocs.Conversion](../../)
93+
94+
<!-- DO NOT EDIT: generated by xmldocmd for GroupDocs.conversion.dll -->
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: ImageSaving
3+
second_title: GroupDocs.Conversion for .NET API Reference
4+
description: Called for each image being written to the Markdown document.
5+
type: docs
6+
weight: 10
7+
url: /net/groupdocs.conversion.options.convert/imarkdownimagesavingcallback/imagesaving/
8+
---
9+
## IMarkdownImageSavingCallback.ImageSaving method
10+
11+
Called for each image being written to the Markdown document.
12+
13+
```csharp
14+
public void ImageSaving(MarkdownImageSavingArgs args)
15+
```
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| args | MarkdownImageSavingArgs | Mutable arguments describing the current image. |
20+
21+
### See Also
22+
23+
* class [MarkdownImageSavingArgs](../../markdownimagesavingargs)
24+
* interface [IMarkdownImageSavingCallback](../../imarkdownimagesavingcallback)
25+
* namespace [GroupDocs.Conversion.Options.Convert](../../../groupdocs.conversion.options.convert)
26+
* assembly [GroupDocs.Conversion](../../../)
27+
28+
<!-- DO NOT EDIT: generated by xmldocmd for GroupDocs.conversion.dll -->

english/net/groupdocs.conversion.options.convert/ipagedconvertoptions/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: IPagedConvertOptions
33
second_title: GroupDocs.Conversion for .NET API Reference
44
description: Represents convert options that allows conversion to perform page limitation by specifying start page and pages count
55
type: docs
6-
weight: 1850
6+
weight: 1860
77
url: /net/groupdocs.conversion.options.convert/ipagedconvertoptions/
88
---
99
## IPagedConvertOptions interface

english/net/groupdocs.conversion.options.convert/ipagerangedconvertoptions/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: IPageRangedConvertOptions
33
second_title: GroupDocs.Conversion for .NET API Reference
44
description: Represents convert options that support conversion of specific list of pages
55
type: docs
6-
weight: 1840
6+
weight: 1850
77
url: /net/groupdocs.conversion.options.convert/ipagerangedconvertoptions/
88
---
99
## IPageRangedConvertOptions interface

english/net/groupdocs.conversion.options.convert/ipasswordconvertoptions/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: IPasswordConvertOptions
33
second_title: GroupDocs.Conversion for .NET API Reference
44
description: Represents convert options that support password protection for converted documents.
55
type: docs
6-
weight: 1860
6+
weight: 1870
77
url: /net/groupdocs.conversion.options.convert/ipasswordconvertoptions/
88
---
99
## IPasswordConvertOptions interface

english/net/groupdocs.conversion.options.convert/ipdfrecognitionmodeoptions/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: IPdfRecognitionModeOptions
33
second_title: GroupDocs.Conversion for .NET API Reference
44
description: Represents convert options that control recognition mode when converting from PDF
55
type: docs
6-
weight: 1870
6+
weight: 1880
77
url: /net/groupdocs.conversion.options.convert/ipdfrecognitionmodeoptions/
88
---
99
## IPdfRecognitionModeOptions interface

0 commit comments

Comments
 (0)