Skip to content

Commit 5851c25

Browse files
committed
995577: Resolved the given feedback.
1 parent 0ab50fd commit 5851c25

File tree

1 file changed

+4
-2
lines changed
  • Images/Add-image-as-background-in-PDF/.NET/Add-image-as-background-in-PDF

1 file changed

+4
-2
lines changed

Images/Add-image-as-background-in-PDF/.NET/Add-image-as-background-in-PDF/Program.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// Create the new PDF document
66
using (PdfDocument document = new PdfDocument())
77
{
8+
//Set margin
9+
document.PageSettings.Margins.All = 0;
810
// Add a new page to the document
911
PdfPage page = document.Pages.Add();
1012
// Get the client size
@@ -25,8 +27,8 @@
2527
new SizeF(clientSize.Width, clientSize.Height)
2628
);
2729
page.Graphics.Restore(state);
28-
// Define a small margin for the text content.
29-
const float margin = 10f;
30+
// Define a margin for the text content.
31+
const float margin = 40f;
3032
// Text bounds: fill the page within margins.
3133
RectangleF textBounds = new RectangleF(
3234
margin,

0 commit comments

Comments
 (0)