You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learn how to add borders around images in the generated PDF document.
26
+
Learn how to add borders around [images]({%slug radpdfprocessing-model-image%}) in the generated PDF document.
22
27
23
28
## Solution
24
29
25
-
### Drawing Borders Around Images
26
-
Follow one of the approaches below:
30
+
To draw borders around images follow one of the approaches below:
31
+
32
+
### Approach 1: Using a Table with Borders
33
+
34
+
Insert a table with a single [TableCell]({%slug radpdfprocessing-editing-table-tablecell%}) and put the image in the cell:
27
35
28
-
#### Approach 1: Using a Table with Borders
29
36
```csharp
30
37
RadFixedDocumentdocument=newRadFixedDocument();
31
38
RadFixedPagepage=document.Pages.AddPage();
@@ -52,9 +59,14 @@ using (Stream output = File.OpenWrite(@"..\..\exported.pdf"))
52
59
{
53
60
pdfProvider.Export(document, output);
54
61
}
55
-
```
62
+
```
63
+
64
+

65
+
66
+
### Approach 2: Using FixedContentEditor to Draw a Rectangle Border
67
+
68
+
An alternative approach is to draw a rectangular border around an image in a PDF using RadPdfProcessing, you can use the [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) to draw both the image and the rectangle:
56
69
57
-
#### Approach 2: Using FixedContentEditor to Draw a Rectangle Border
-[How to Change File Size of PDF with Images](https://docs.telerik.com/devtools/document-processing/knowledge-base/pdfprocessing-change-file-size-through-image-quality-and-compression)
105
-
-[Optimizing and Reducing PDF Size with RadPdfProcessing](https://docs.telerik.com/devtools/document-processing/knowledge-base/optimize-and-reduce-pdf-size-radpdfprocessing)
Copy file name to clipboardExpand all lines: libraries/radpdfprocessing/model/image.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,3 +95,4 @@ The Image class exposes also the **GetBitmapSource()** method, enabling you to o
95
95
*[Splitting a Large Image Across Multiple PDF Pages]({%slug split-export-large-image-multiple-pdf-pages-radpdfprocessing%})
96
96
*[Change file size of a PDF with images through ImageCompression and ImageQuality]({%slug pdfprocessing-change-file-size-through-image-quality-and-compression%})
97
97
*[Adding a Barcode to a PDF Document using PdfProcessing and the WinForms BarcodeView]({%slug add-barcode-to-pdf-telerik%})
98
+
*[Adding an Image Border in PdfProcessing]({%slug pdf-image-border%})
0 commit comments