shairontoledo / rghost

RGhost is a document creation and conversion API. It uses the Ghostscript framework for the format conversion, utilizes EPS templates and is optimized to work with larger documents. Support(PDF,PS,GIF,TIF,PNG,JPG,etc)
http://rghost.rubyforge.org
MIT License
187 stars 46 forks source link

using rotate causes the page to flip #55

Closed ollym closed 10 years ago

ollym commented 10 years ago

This works fine: (the text is rotated and the page stays the right way around):

class TemplateDocument < RGhost::Document

  def initialize(order, template)
    super paper: [200, 100]
    rotate 45
    show 'hello world'
  end
end

This doesn't: (the entire page is flipped from landscape to portrait):

class TemplateDocument < RGhost::Document

  def initialize(order, template)
    super paper: [200, 100]
    rotate 50
    show 'hello world'
  end
end
ollym commented 10 years ago

The fix is to have:

doc.render(:pdf, d: { AutoRotatePages: '/None' })

In your render method.