UseScreenDC
IPDFDocument3 :: General document methods

See Also Example
Collapse All

This property gets or sets the value indicating whether to use the screen DC for EMF drawings or not.

Syntax

VARIANT_BOOL UseScreenDC { get; set; }
Value
VARIANT_TRUE if the screen DC is used for EMF drawings, VARIANT_FALSE otherwise.

Remarks

The UseScreenDC property specifies whether or not to use screen DC as a reference DC for EMF drawing functions.

Equivalent in new interface: IPDFDocument4::UseScreenBasedDC.

Example

Directly Drawing Text in a PDF Document

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.UseScreenDC := true;
PDF.BeginDoc;
r := Rect(10,10,200,200);
DrawText(PDF.GetUsedDC, 'Hello, PDF!', 11, R, DT_CENTER);
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->UseScreenDC = TRUE;
PDF->BeginDoc();
RECT r = {10, 10, 200, 200 };
DrawText((HDC)PDF->GetUsedDC(), "Hello, PDF!", 11, &r, DT_CENTER);
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.UseScreenDC = true;
PDF.BeginDoc();
Rect r = new Rect();
r.Bottom = 200;
r.Right = 200;
r.Left = 10;
r.Top = 10;
DrawText((HDC)PDF.GetUsedDC(), "Hello, PDF!", 11, ref r, DT_CENTER);
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.UseScreenDC = True
PDF.BeginDoc
Dim r as RECT
r.bottom = 200
r.right = 200
r.left = 10
r.top = 10
DrawText PDF.GetUsedDC, "Hello, PDF!", 11, R, DT_CENTER
PDF.EndDoc

See Also

Reference