# Prawn gem: How to create the .pdf from an \*existing\* file

**URL:** <https://www.ruby-forum.com/t/prawn-gem-how-to-create-the-pdf-from-an-existing-file/190903>\
**Category:** Rails\
**Created:** [June 30, 2010, 1:43pm UTC](https://www.ruby-forum.com/t/prawn-gem-how-to-create-the-pdf-from-an-existing-file/190903 "2010-06-30T13:43:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tharrisx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Post date:** [June 30, 2010, 1:43pm UTC](https://www.ruby-forum.com/t/prawn-gem-how-to-create-the-pdf-from-an-existing-file/190903/1 "2010-06-30T13:43:23Z")

</div>

Hi there,

Can anybody show me (maybe copy/paste a simple code example) how to  
create the .pdf file from an existing (.xls) file, using the Prawn gem?

Basically, I’d need the command that takes an existing (.xls) file to  
save it as a .pdf, afterwards.

(I’m asking because the Prawn documentation at  
[http://prawn.majesticseacreature.com/docs/](http://prawn.majesticseacreature.com/docs/) seems to be gone since quite  
a while - it’s not even usable via Google cache, anymore…)

Thanks a lot for any help with this!  
Tom

---

<div class="post-metadata">

**Author:** ![tharrisx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Post date:** [June 30, 2010, 5:08pm UTC](https://www.ruby-forum.com/t/prawn-gem-how-to-create-the-pdf-from-an-existing-file/190903/2 "2010-06-30T17:08:47Z")

</div>

Turns out the Prawn gem cannot handle existing files…
