ConvertUtilPointToPixel Method (Double) |
Namespace: Aspose.Words
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); PageSetup pageSetup = builder.PageSetup; pageSetup.TopMargin = ConvertUtil.PixelToPoint(2.0); double myDpi = 192.0; Console.WriteLine("The size of my top margin is {0} points, or {1} pixels with default resolution.", pageSetup.TopMargin, ConvertUtil.PointToPixel(pageSetup.TopMargin)); Console.WriteLine("The size of my top margin is {0} points, or {1} pixels with custom resolution.", pageSetup.TopMargin, ConvertUtil.PointToPixel(pageSetup.TopMargin, myDpi));