Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8728061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:33:10+00:00 2026-06-13T08:33:10+00:00

I need to generate a document with nested tables in prawn pdf. The most

  • 0

I need to generate a document with nested tables in prawn pdf.

The most recent answer on this stack overflow question seems to indicate that I can do it like this:

(Prawn::Document.generate("subtable.pdf") do |pdf|
  subtable = pdf.make_table([["sub"],["table"]])
  pdf.table([[subtable,"original"]])
end

Unfortunatley doing that gives me the following error:

undefined method `size=' for #<Prawn::Table::Cell::Subtable:0xad3f1e4>

So checking the documentation I can see:
” You can use Prawn::Document#make_table to create a table for use as a subtable without immediately drawing it. See examples/table/bill.rb for a somewhat complex use of subtables. ”
http://prawn.majesticseacreature.com/docs/0.11.1/Prawn/Table.html

Where can I see this examples/table/bill.rb? I’ve cloned the github repo, scoured the website and the manual but can’t find these examples anywhere!

I know I’m missing something stupid. Does anyone know how do do nested tables correctly in prawn pdf and/or where the example files are located?

Thanks for any help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:33:11+00:00Added an answer on June 13, 2026 at 8:33 am

    do:

    gem which prawn

    that would give you location of the prawn gem. It includes the examples dir. You can find table/bill.rb there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need to look xsd file for generate code so i need this document
I need to generate a Japanese language PDF document formatted with a Japanese font,
I need to automatically generate a PDF file from an exisiting (X)HTML-document. The input
I have document source in XML. I need to generate PDF and HTML pages
I need to generate a multi-page report document ultimately in pdf format which consists
My current document root is this (via $_SERVER['DOCUMENT_ROOT']): /var/www/html/clients/app/folder I need to generate one
I need to programmatically generate an RTF document with a table that has a
I need to generate a ms-word document from a pl/sql query to export a
I need to generate a user interface for entering a sales document (eg invoice).
I need to generate a list of keywords for each document in a set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.