Skip to content

Commit 4a09881

Browse files
committed
1017893: Added proper code snippet under PDF Conformance section
1 parent 1125819 commit 4a09881

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Document-Processing/PDF/PDF-Library/NET/Working-with-PDF-Conformance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ FileStream fontStream = new FileStream("Arial.ttf", FileMode.Open, FileAccess.Re
12391239
//Set the font.
12401240
PdfFont font = new PdfTrueTypeFont(fontStream, 14);
12411241
//Draw the text.
1242-
graphics.DrawString("Hello world!", pdfFont, brush, new PointF(20, 20));
1242+
graphics.DrawString("Hello world!", font, brush, new PointF(20, 20));
12431243

12441244
//Save and close the document.
12451245
document.Save("Output.pdf");
@@ -1296,7 +1296,7 @@ Dim brush As PdfBrush = New PdfSolidBrush(Color.Black)
12961296
Dim font As New Font("Arial", 20.0F, FontStyle.Regular)
12971297
Dim pdfFont As PdfFont = New PdfTrueTypeFont(font, FontStyle.Regular, 12, False, True)
12981298
'Draw the text.
1299-
graphics.DrawString("Hello world!", font, brush, New PointF(20, 20))
1299+
graphics.DrawString("Hello world!", pdfFont, brush, New PointF(20, 20))
13001300

13011301
'Save and close the document.
13021302
document.Save("Output.pdf")

0 commit comments

Comments
 (0)