Search Results

Search found 2 results on 1 pages for 'rip747'.

Page 1/1 | 1 

  • Rails: Convert HTML to PDF?

    - by rip747
    What is the best and easiest way of taking HTML and converting it into a PDF, similar to use CFDOCUMENT on ColdFusion? UPDATE: I really appreciate all the comments and suggestions that people have given so far, however I feel that people leaving their answers are missing the point. 1) the solution has to be free or open sourced. one person suggested using pricexml and the other pd4ml. both of these solutions costs money (pricexml costing an arm and a leg) which i'm not about the fork over. 2) they must be able to take in html (either from a file, url or a string variable) and then produce the pdf. libraries like prawn, rprf, rtex are produced using their own methods and not taking in html. please don't think i'm ungrateful for the suggestions, it's just that pdf generation seems like a really problem for people like me who use ColdFusion but want to convert to Rails.

    Read the article

  • How can i split up a component using cfinclude and still use inheritance?

    - by rip747
    Note: this is just a simplized example of what i'm trying to do to get the idea across. The problem I'm having is that I want to use cfinclude inside cfcomponent so that i can group like methods into separate files for more manageability. The problem I'm running into is when i try to extend another component that also uses cfinclude to manage it's method as demostrated below. Note that ComponentA extends ComponentB: ComponentA ========== <cfcomponent output="false" extends="componentb"> <cfinclude template="componenta/methods.cfm"> </cfcomponent> componenta/methods.cfm ====================== <cffunction name="a"><cfreturn "componenta-a"></cffunction> <cffunction name="b"><cfreturn "componenta-b"></cffunction> <cffunction name="c"><cfreturn "componenta-c"></cffunction> <cffunction name="d"><cfreturn super.a()></cffunction> ComponentB ========== <cfcomponent output="false"> <cfinclude template="componentb/methods.cfm"> </cfcomponent> componentb/methods.cfm ====================== <cffunction name="a"><cfreturn "componentb-a"></cffunction> <cffunction name="b"><cfreturn "componentb-b"></cffunction> <cffunction name="c"><cfreturn "componentb-c"></cffunction> The issue is that when i try to initialize ComponentA I get an the error: "Routines cannot be declared more than once. The routine a has been declared twice in different templates." The whole reason for this is because when you use cfinclude it's evaluated at RUN TIME instead of COMPILE TIME. Short of moving the methods into the components themselves and eliminating the use of cfinclude, how can i get around this or does someone have a better idea splitting up large components?

    Read the article

1