public void opRectangle(PdfPoint point, PdfSize size) { WriteNumber(point.x.pnts, 2, true); WriteNumber(point.y.pnts, 2, true); WriteNumber(size.width.pnts, 2, true); WriteNumber(size.height.pnts, 2, true); WriteStr(bs_re); }
public PdfPage(PdfSize pageSize, PdfContent content) { _pageSize = pageSize; _cropBox.llx = PdfDistance.Zero; _cropBox.lly = PdfDistance.Zero; _cropBox.urx = pageSize.width; _cropBox.ury = pageSize.height; _bleedBox = _cropBox; _trimBox = _cropBox; _artBox = _cropBox; _content = content; }
public void Image(PdfPoint point, PdfSize size, PdfImage image) { if (image is null) { throw new ArgumentNullException(nameof(image)); } if (_textMode) { opEndText(); } opSaveGraphicsState(); opCurrentTransformationMatrix(1, 0, 0, 1, point.y.pnts, point.x.pnts); opCurrentTransformationMatrix(size.height.pnts, 0, 0, size.width.pnts, 0, 0); WriteResourceName(image); WriteStr(bs_Do); opRestoreGraphicsState(); }
public void AddPage(PdfSize pageSize, PdfContent content) { AddObj(new PdfPage(pageSize, content)); }
public void DrawRectangle(PdfStyleLine lineStyle, PdfStyleFill fillStyle, PdfPoint begin, PdfSize size) { if (_textMode) { opEndText(); } if (lineStyle != null) { SetLineStyle(lineStyle); } if (fillStyle != null) { SetFillStyle(fillStyle); } opRectangle(begin, size); if (lineStyle != null & fillStyle != null) { opFillStroke(); } else if (lineStyle != null) { opStroke(); } else if (fillStyle != null) { opFill(); } }
public void DrawLine(PdfStyleLine lineStyle, PdfPoint begin, PdfSize size) { if (_textMode) { opEndText(); } SetLineStyle(lineStyle); opMoveTo(begin); opLineTo(begin + size); opStroke(); }