🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

fa_princely

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fa_princely

bundlerRubygems
Version
1.2.7
Version published
Maintainers
2
Created
Source

= Princely

Princely is a simple wrapper for the Prince XML PDF generation library (http://www.princexml.com). The plugin will also automatically registers the PDF MimeType so that you can use pdf as a format in controller respond_to blocks.

== Example

class Provider::EstimatesController < Provider::BaseController
  # You can render PDF templates simply by
  # using the :pdf option on render templates.
  def show
    respond_to do |format|
      format.html
      format.pdf do
        render :pdf => "file_name", 
               :template => "controller/action.pdf.erb",
               :stylesheets => ["application","prince"]
               :layout => "pdf"
      end
    end
  end
  
  # Alternatively, you can use make_and_send_pdf to
  # render out a PDF for the action without a
  # respond_to block.
  def pdf
    make_and_send_pdf("file_name")
  end
end

== Render Defaults

The defaults for the render options are as follows:

layout:      false
template:    the template for the current controller/action
stylesheets: none

== Contributors

  • Gemification and more: Nic Williams

== Resources

  • Copyright (c) 2007-2009 Michael Bleigh and Intridea, Inc., released under the MIT license.

FAQs

Package last updated on 15 Dec 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts