Skip to content

Commit 847f7d8

Browse files
Update create-custom-jpeg-image-converter-net-standard.md
1 parent db830c8 commit 847f7d8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

knowledge-base/create-custom-jpeg-image-converter-net-standard.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The following code snippets demonstrate how to create a custom implementation of
6969

7070
jpegImageData = ms.ToArray();
7171
}
72+
7273
}
7374

7475
return true;
@@ -103,21 +104,23 @@ The following code snippets demonstrate how to create a custom implementation of
103104
string[] imageFiles = Directory.GetFiles(imageFolderPath);
104105
RadFixedDocument fixedDocument = new RadFixedDocument();
105106
RadFixedDocumentEditor documentEditor = new RadFixedDocumentEditor(fixedDocument);
107+
106108
foreach (string imageFilePath in imageFiles)
107109
{
108110
FileStream fileStream = new FileStream(imageFilePath, FileMode.Open);
109111
Telerik.Windows.Documents.Fixed.Model.Resources.ImageSource _imageSource = new Telerik.Windows.Documents.Fixed.Model.Resources.ImageSource(fileStream);
110112
documentEditor.InsertImageInline(_imageSource);
111113
documentEditor.InsertLineBreak();
112114
}
113-
documentEditor.Dispose();
114-
115+
116+
documentEditor.Dispose();
115117
string outputFilePath = @"output.pdf";
116118
File.Delete(outputFilePath);
117119
using (Stream output = File.OpenWrite(outputFilePath))
118120
{
119121
provider.Export(fixedDocument, output);
120122
}
123+
121124
Process.Start(new ProcessStartInfo() { FileName = outputFilePath, UseShellExecute = true });
122125

123126
{{endregion}}

0 commit comments

Comments
 (0)