I want to convert Excel with multiple sheets and Word files to PDF format as a single file using Ruby.
Is there any Script/Gems/Plugins available to achieve this?
While PDF files are mobile device-friendly, easy to read and can’t be altered. That’s why users convert word documents to PDF in ruby when sending important information like online bills, transactions history, and handouts etc. Now you know why you should convert Word documents to PDF file.
Sample JavaScript code for using PDFTron SDK to convert Office documents to PDF (including Word, Excel, PowerPoint and Publisher) without needing any external dependencies or MS Office licenses.
You can convert Word DOCX to PDF using the built-in functionality provided by Microsoft Office, but you may need to convert your Word documents DOCX to PDF programmatically. Using Groupdocs Conversion APIs to convert your Word documents to PDF is fast, easy and instant.
There is not a Gem doing all the job. but you can combine some:
For excel files - read data using roo GEM - http://roo.rubyforge.org/
For word files Opening .doc files in Ruby
Convert the data readed in previous steps into html.
Then convert it to pdf using: https://github.com/pdfkit/PDFKit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With