Android Code Snippet PDF: simple conversion routines

Discussion in 'Code Snippets' started by LucaMs, May 4, 2015.

Similar threads

B4A Library Printing and Pdf creation
B4A Tutorial Google Maps
B4A Library [B4X] [class] MJPEG decoder
B4A Library Pdf To Text
B4A Question SSL Websocket client
  1. LucaMs

    LucaMs Expert Licensed User

    SubName: PointsToCms and CmsToPoints

    Author: "LucaMs"

    Description: two simple conversion routines PostScript points/centimeters

    Sub PointsToCms(Points As Double) As Double
    Return (Points / 72) * 2.54
    End Sub

    Sub CmsToPoints(Cms As Double) As Double
    Return (Cms / 2.54) * 72
    End Sub
    Dependencies: None

    1 inch = 72 PostScript points.
    I'm italian, so I prefer cms. 1 inch = 2.54 cm

    Perhaps a complete converter would be useful (?)

    Tags: PostScript, point, cm, centimeter, convert, PDF
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice