/// <summary> /// Change unit of the size and recalculate height and width /// </summary> /// <param name="unit">New unit</param> public PdfSize ChangeUnits(PdfUnit unit) { var ratio = Unit.Points / unit.Points; var result = new PdfSize(unit, Height * ratio, Width * ratio); return result; }
/// <summary> /// Change unit of the size and recalculate height and width /// </summary> /// <param name="unit">New unit</param> public PdfSize ChangeUnits(PdfUnit unit) { var ratio = Unit.Points / unit.Points; var result = new PdfSize(unit, Height * ratio, Width * ratio); return(result); }
internal PdfPage(PdfPageTree parent, PdfSize size) { m_Size = size; m_Unit = m_Size.Unit; m_Parent = parent; m_Fonts = new List<PdfFont>(); m_Elements = new List<PdfElement>(); }
public PdfSize(PdfUnit unit, float width, float height) { if (unit == null) throw new ArgumentException("unit should not be null"); m_Unit = unit; Width = width; Height = height; }
public PdfSize(PdfUnit unit, float width, float height) { if (unit == null) throw new PdfException(StringConsts.ARGUMENT_ERROR+GetType().Name+".ctor(unit==null)"); m_Unit = unit; Width = width; Height = height; }
public PdfSize(PdfUnit unit, float width, float height) { if (unit == null) { throw new PdfException(StringConsts.ARGUMENT_ERROR + GetType().Name + ".ctor(unit==null)"); } m_Unit = unit; Width = width; Height = height; }
/// <summary> /// Adds new page to document /// </summary> /// <returns>Page</returns> public PdfPage AddPage(PdfUnit unit) { unit = unit ?? Unit ?? PdfUnit.Default; var size = PageSize != null ? PageSize.ChangeUnits(unit) : PdfPageSize.Default(unit); return AddPage(size); }