# Combining PDF and XML files into PDF

**URL:** <https://www.ruby-forum.com/t/combining-pdf-and-xml-files-into-pdf/77936>\
**Category:** Ruby\
**Created:** [December 1, 2006, 6:47pm UTC](https://www.ruby-forum.com/t/combining-pdf-and-xml-files-into-pdf/77936 "2006-12-01T18:47:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bill\_walton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f07891/32.png) [@bill\_walton](https://www.ruby-forum.com/u/bill_walton)\
**Post date:** [December 1, 2006, 6:47pm UTC](https://www.ruby-forum.com/t/combining-pdf-and-xml-files-into-pdf/77936/1 "2006-12-01T18:47:05Z")

</div>

My app reads an XML file into my database, allows editing the content,  
then produces a new XML file and, optionally, a PDF file from the same  
data. I’m currently using REXML to readin the XML file, Builder to  
write the new XML file out, and PDF::Writer to write the PDF file.

Now I need to put the XML data into the PDF file and have the result  
conform to the Adobe spec for that. I’d really appreciate any  
suggestions re: the best / easiest approach to ‘get there from here’.

TIA,  
Bill

---

<div class="post-metadata">

**Author:** ![bill\_walton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f07891/32.png) [@bill\_walton](https://www.ruby-forum.com/u/bill_walton)\
**Post date:** [December 3, 2006, 7:31pm UTC](https://www.ruby-forum.com/t/combining-pdf-and-xml-files-into-pdf/77936/2 "2006-12-03T19:31:13Z")

</div>

On Sat, Dec 02, 2006 at 02:45:11AM +0900, bill walton wrote:

> My app reads an XML file into my database, allows editing the content,  
> then produces a new XML file and, optionally, a PDF file from the same  
> data. I’m currently using REXML to readin the XML file, Builder to  
> write the new XML file out, and PDF::Writer to write the PDF file.
> 
> Now I need to put the XML data into the PDF file and have the result  
> conform to the Adobe spec for that. I’d really appreciate any  
> suggestions re: the best / easiest approach to ‘get there from here’.

For PDF Creation take a look at PDF::Writer

```
- http://ruby-pdf.rubyforge.org/pdf-writer/index.html

```

enjoy,

-jeremy
