    -- GENERATED by C->Haskell Compiler, version 0.28.8 Switcheroo, 25 November 2017 (Haskell)
    -- Edit the ORIGNAL .chs file instead!

    {-# LINE 1 "./GI/Cairo/Render/Internal/Surfaces/PDF.chs" #-}
    {-# LANGUAGE CPP #-}
    -----------------------------------------------------------------------------
    -- |
    -- Module      :  GI.Cairo.Render.Internal.Surfaces.PDF
    -- Copyright   :  (c) Paolo Martini 2005
    -- License     :  BSD-style (see doc/COPYRIGHT)
    --
    -- Maintainer  :  p.martini@neuralnoise.com
    -- Stability   :  experimental
    -- Portability :  portable
    --
    -- Rendering PDF documents.
    -----------------------------------------------------------------------------

    module GI.Cairo.Render.Internal.Surfaces.PDF where
    import qualified Foreign.C.Types as C2HSImp
    import qualified Foreign.Ptr as C2HSImp

    import GI.Cairo.Render.Types
    {-# LINE 19 "./GI/Cairo/Render/Internal/Surfaces/PDF.chs" #-}

    import Foreign
    import Foreign.C

    {-# LINE 24 "./GI/Cairo/Render/Internal/Surfaces/PDF.chs" #-}

    pdfSurfaceCreate :: (FilePath) -> (Double) -> (Double) -> IO ((Surface))
    pdfSurfaceCreate :: FilePath -> Double -> Double -> IO Surface
    pdfSurfaceCreate FilePath
    a1 Double
    a2 Double
    a3 =
      FilePath -> (CString -> IO Surface) -> IO Surface
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCAString FilePath
    a1 ((CString -> IO Surface) -> IO Surface)
    -> (CString -> IO Surface) -> IO Surface
    forall a b. (a -> b) -> a -> b
    $ \CString
    a1' ->
      let {a2' :: CDouble
    a2' = Double -> CDouble
    forall a b. (Real a, Fractional b) => a -> b
    realToFrac Double
    a2} in
      let {a3' :: CDouble
    a3' = Double -> CDouble
    forall a b. (Real a, Fractional b) => a -> b
    realToFrac Double
    a3} in
      pdfSurfaceCreate'_ a1' a2' a3' >>= \res ->
      mkSurface res >>= \res' ->
      return (res')

    {-# LINE 28 "./GI/Cairo/Render/Internal/Surfaces/PDF.chs" #-}

    pdfSurfaceSetSize :: (Surface) -> (Double) -> (Double) -> IO ()
    pdfSurfaceSetSize a1 a2 a3 =
      withSurface a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      pdfSurfaceSetSize'_ a1' a2' a3' >>
      return ()

    {-# LINE 32 "./GI/Cairo/Render/Internal/Surfaces/PDF.chs" #-}

    foreign import ccall safe "GI/Cairo/Render/Internal/Surfaces/PDF.chs.h cairo_pdf_surface_create"
      pdfSurfaceCreate'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO (SurfacePtr)))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Surfaces/PDF.chs.h cairo_pdf_surface_set_size"
      pdfSurfaceSetSize'_ :: ((SurfacePtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))