ruby-on-railspdfwkhtmltopdfprawnto

Rails app with Prawn and PDFKit, Prawn no longer working


I have a rails app which generates pdfs using prawnto_2.

Somewhere else in the app I wish to generate PDFs using PDFKit. After installing PDFkit (and wkhtmltopdf-binary), the Prawn generated PDF no longer renders.

It could be an issue with using PDFKit Middleware. (which renders any file to PDF by simply writing .pdf after the URL

Is it possible to have an app with both installed? any suggestions.


Solution

  • First Solution:

    Disabled PDFKit middleware

    Second solution:

    uninstalled PDFKit and installed Wicked_PDF.