Giter Club home page Giter Club logo

prawnto's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

prawnto's Issues

Notes about Prawn 1.0 roadmap

Hello!

Thanks for building an extension to Prawn. I'm filing this issue to let you know that we're currently working towards a stable 1.0 release of Prawn, and I want to invite you to be part of the discussion around that.

We will only have one more major release before 1.0 is shipped: it will be labeled 0.15 and it will be cut on 2014-02-16.

The functionality of the 0.15 release will be largely the same as what we ship in 1.0, so if you want to test your project against the newest Prawn code, that would be a good time to
do it. You can also get a head start by trying out what is on master now, and reporting any problems you encounter.

If your project is sufficiently up to date and is able to run on the latest Prawn code, the next step would be to take a look at our API compatibility plans, which are described in detail here:

https://groups.google.com/forum/#!topic/prawn-ruby/dbTSnlDhED0

Here's the very quick summary:

  • If your project is using stable APIs and ONLY stable APIs, it will be safe for you to lock your Prawn dependency to "~> 1.0".
  • If your project is using stable and extension APIs, keep an eye out for deprecation warnings, and lock your gem to
    a range of known good minor Prawn versions. (i.e. ">= 1.0", "<=1.x"). We want to eventually apply semantic versioning to our extension API as well, but we're not there yet.
  • The use of experimental APIs in your extensions is not recommended unless you consider your own code to be experimental as well. Instead, work with us to figure out what it would take to get these experimental APIs stabilized or extracted.

I know this is a little bit confusing, and my hope is that in the not too distant future we'll be able to cut a Prawn 2.0 release that has much better support for downstream dependencies.

Until that time, what we lack in stability we'll try to make up in support for your project. Use the Prawn mailing list to contact us about any concerns or breakage, help us work on API stabilization, and let us know when you need extension points to support your project.

Thanks!
-greg

Rails 5 compatibility: Undefined Mime::PDF

Mime::PDF is no longer defined under Rails 5. Use

      def set_content_type
        @controller.response.content_type ||= Mime::EXTENSION_LOOKUP['pdf']
      end

PR will be submitted shortly.

How do I render html tags?

If i write below code it displays as it is which is not what I wanted. Doesn't prawnto supports html tags like headers, paragraph, bold, italics, and many more?

pdf.text "a5his"

:template option doesn't work

I've created a PDF , with prawn in which i used the follwing code:

template = "/path_to_pdf_template"

Prawn::Document.generate("foo.pdf", :template => template,:page_size => "LETTER") do
canvas do
#All of my drawing stuff here...
end
end

to draw on top of the pdf template i've just loaded with the :template option, it works fine!, i've developed my foo.pdf nicely, running in a
regular non-rails enviorment.

My problem arises, when I try to to this the same thing inside the rails app, in which i use prawnto to access prawn facilities.

I think i'm doing the right thing which is:

Create my foo.pdf.prawn template, and put all of my drawing stuff there.
Put my "respond_to do |format| format.pdf end" in my action
and at the top of my controller to set up the Prawn::Document option (as is described in prawnto docs) in a call to
"prawnto" method like this:

          template = "/path_to_pdf_template"
          prawnto :prawn => { :template => template }

but it doesn't work, ive tried all! but always is the same result, the only thing i have is my drawing stuff but without the template content, i've tried with a jpeg file and the :background option and it works!, but something happens
with the :template option.

I'm using rails 2.3.5
Prawn 0.8.4
and prawnto from github

I think the problem is prawnto, anyone can help?

how do i render formatting inline from a textarea input?

I am using prawnto to render a view of a "letter' that is generated from text in a textarea form.

How can I render formatting like bold and underline (for simplicity right now, using say html markup, and in the future maybe a simpler markdown language.

Deprecation Warning During Tests Under Rails 3.1

When I run my tests, I get this:

DEPRECATION WARNING: Inheriting from ActionView::Template::Handler is deprecated.
Since Rails 3, all the API your template handler needs to implement is to respond to #call.
(called from module:TemplateHandlers at
/Users/leigh/Programming/wapp_dev/cdjobs/vendor/plugins/prawnto/lib/prawnto/template_handlers/base.rb:3)

Prawnto works perfectly in the app.

**Leigh

Not compatible with Rails 2.1

The homepage says "written and tested only for Rails 2.2 & 2.1", however this plugin is not compatible with Rails 2.1 since it uses memoize which appeared only in Rails 2.2

CompileSupport IE & SSL Request

It was not displayed in IE.
It was displayed when changing from

33 def ssl_request?
34  @controller.request.env['SERVER_PROTOCOL'].downcase == "https"
35 end

41 @controller.headers['Pragma'] = 'public'

50 @controller.headers['Cache-Control'] = 'maxage=1'

to

33 def ssl_request?
34  @controller.request.ssl?
35 end

41 @controller.headers["Pragma"]="private"

50 @controller.headers["Cache-Control"]="private"

rake test error

ActionView::TemplateError: You have a nil object when you didn't expect it! The error occurred while evaluating nil.downcase

class Prawnto::TemplateHandler::CompileSupport
    def ssl_request?
        @controller.request.env['SERVER_PROTOCOL'].downcase == "https"
    end
end

to

class Prawnto::TemplateHandler::CompileSupport
    def ssl_request?
        @controller.request.env['SERVER_PROTOCOL'].to_s.downcase == "https"
    end
end

How to pick up the generated PDF?

Let's say I want to store the generated PDF for further use given certain conditions. How do I get access to the pdf generated with prawnto?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.