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 7442219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:08:32+00:00 2026-05-29T11:08:32+00:00

I have a couple of PDF template files with complex content and several blank

  • 0

I have a couple of PDF template files with complex content and several blank regions/areas in them. I need to be able to write text in those blank regions and save the resulting PDFs in a folder.

I googled for answers on this question quite intensively, but I didn’t find definite answers. One of the better solutions is PDF::Toolkit, but it would require the purchase of Adobe Acrobat to add replaceable attributes to existing PDF documents.

The PHP world is blessed with FPDI that can be used to simply open a PDF file and write/draw on it over the existing content. There is a Ruby port of this library, but the last commit for it happened at the beginning of 2009. Also that project doesn’t look like it is widely used and supported.

The question is: What is the better Ruby way of editing, writing or drawing on existing PDFs?

This question also doesn’t seem to be answered on here. These questions are related, but not really the same:

  • Prawn gem: How to create the .pdf from an *existing* file (.xls)
  • watermark existing pdf with ruby
  • Ruby library for manipulating existing PDF
  • How to replace a word in an existing PDF using Ruby Prawn?
  • 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-05-29T11:08:33+00:00Added an answer on May 29, 2026 at 11:08 am

    you have to definitely check out Prawn gem, by which you can generate any custom pdf files. You can actually use prawn to write in text into existing pdfs by treating the existing PDF as a template for your new Prawn document.

    For example:

    filename = "#{Prawn::DATADIR}/pdfs/multipage_template.pdf"
    Prawn::Document.generate("full_template.pdf", :template => filename) do
      text "THis content is written on the first page of the template", :align => :center
    end
    

    This will write text onto the first page of the old pdf.

    See more here:
    http://prawn.majesticseacreature.com/manual.pdf

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

Sidebar

Related Questions

I have couple of dozen pieces of data that I need to save and
I have couple questions regarding some C++ rules. Why am I able to call
Here's the problem: I have couple of pages which gets its content from a
I have a web application that uses a couple of PDF forms to create
I have a project where I need to generate a PDF file. Within this
I have couple of asp.net link buttons, can't change them to asp.net hyperlinks. I
I have a form where users can upload Pdf files(about 30 pages to one
I have a form where users can upload Pdf files(about 30 pages to one
I have a couple of files which I have to update periodically through a
I have a use case where I need to return a PDF to a

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.