FLOAT OffsetXForDC { get; set; } |
The vertical offset value for mapping the virtual DC contents to PDF page.
Default value is 0.
{ PDF object is supposed to be created } PDF.UseScreenBasedDC := true; PDF.PageResolution := PDF.GetDCResolution(); { use standard GDI drawing functions: } Rectangle(PDF.GetDC(), 0, 0, PDF.PageWidth, PDF.PageHeight); PDF.ScaleXForDC := 0.5; PDF.ScaleYForDC := 0.5; PDF.OffsetXForDC := PDF.PageWidth / 4; PDF.OffsetYForDC := PDF.PageHeight / 4; PDF.FlushDC(); { rectangle from DC will be translated to this rectangle in PDF: } { left = PDF.PageWidth / 4; } { top = PDF.PageHeight / 4; } { width = PDF.PageWidth / 2; } { height = PDF.PageHeight / 2; }
// PDF object is supposed to be created PDF->UseScreenBasedDC = true; PDF->PageResolution = PDF.GetDCResolution(); // use standard GDI drawing functions: Rectangle(PDF->GetDC(), 0, 0, PDF->PageWidth, PDF->PageHeight); PDF->ScaleXForDC = 0.5f; PDF->ScaleYForDC = 0.5f; PDF->OffsetXForDC = PDF->PageWidth / 4.0f; PDF->OffsetYForDC = PDF->PageHeight / 4.0f; PDF->FlushDC(); // rectangle from DC will be translated to this rectangle in PDF: // left == PDF->PageWidth / 4; // top == PDF->PageHeight / 4; // width == PDF->PageWidth / 2; // height == PDF->PageHeight / 2;
// PDF object is supposed to be created PDF.UseScreenBasedDC = true; PDF.PageResolution = PDF.GetDCResolution(); // use standard GDI drawing functions: Rectangle(PDF.GetDC(), 0, 0, PDF.PageWidth, PDF.PageHeight); PDF.ScaleXForDC = 0.5f; PDF.ScaleYForDC = 0.5f; PDF.OffsetXForDC = PDF.PageWidth / 4.0f; PDF.OffsetYForDC = PDF.PageHeight / 4.0f; PDF.FlushDC(); // rectangle from DC will be translated to this rectangle in PDF: // left == PDF.PageWidth / 4; // top == PDF.PageHeight / 4; // width == PDF.PageWidth / 2; // height == PDF.PageHeight / 2;
' PDF object is supposed to be created PDF.UseScreenBasedDC = true PDF.PageResolution = PDF.GetDCResolution ' use standard GDI drawing functions Rectangle PDF.GetDC, 0, 0, PDF.PageWidth, PDF.PageHeight PDF.ScaleXForDC = 0.5 PDF.ScaleYForDC = 0.5 PDF.OffsetXForDC = PDF.PageWidth / 4 PDF.OffsetYForDC = PDF.PageHeight / 4 PDF.FlushDC ' rectangle from DC will be translated to this rectangle in PDF: ' left = PDF.PageWidth / 4 ' top = PDF.PageHeight / 4 ' width = PDF.PageWidth / 2 ' height = PDF.PageHeight / 2