
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Princely is a simple wrapper for the Prince XML PDF generation library.
The plugin will also automatically register the PDF MimeType so that you can use
pdf as a format in Rails controller respond_to
blocks.
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',
:handlers => %w[erb],
:formats => %w[pdf],
:stylesheets => %w[application prince],
:layout => 'pdf',
:locals => { :foo => 'bar' },
:disposition => 'inline', # PDF will be sent inline, means you can load it inside an iFrame or Embed
:relative_paths => true # Modify asset paths to make them relative. See [the AssetSupport module](/lib/princely/asset_support.rb)
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
The defaults for the render options are as follows:
layout: false
template: the template for the current controller/action
locals: none
stylesheets: none
disposition: attachment (created PDF file will be sent as download)
relative_paths: true
server_flag: true
javascript_flag: false
timeout: none
FAQs
Unknown package
We found that princely demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.