Embedding Excel Files in XSL-FO (Pdf) -Document Generation

We are currently creating all of our white papers using XSL-FO transformation using .xml files as input and generating .pdfs and basically all content in this .xml is either plain text or xhtml. This is great for day to day use cases, but some of our users are referring to Microsoft Excel files that our XSL-Fo (Antenna House) transformer cannot handle natively (and afaik, no other really does).

So what we have done or are doing as an intermediate, short term solution is we create images from user-defined print areas and insert those images into .pdfs.

However, since these images are obviously not "searchable", wise we are looking down at the post-processing stage of OCR'ing these .pdfs, etc. and so on, but in my opinion it all goes deep into the bypass.

I got the idea to convert these .xls files to SpreadsheetML and cover them with an xsl-fo stylesheet, but looking at the spreadsheet specs I gave up on that hope too ... at least without ditching a few dozen man-months in implementation.

So to get to my actual question, how to handle or process Microsoft Excel files in the process of generating an xsl-fo based document?

Cheers and thanks, -J

+1


source to share


3 answers


You can convert the Excel file to PDF and then merge the resulting documents. It's not a straight forward XSL-FO process though.



Personally, I didn't even try to store the Excel file inside the PDF, I would link to it from the PDF. Excel is closed, very complex and for open parts (new XML format) it can still (most often) contain binary blobs and a moving target. I don't think this is a war worth fighting.

0


source


Do your .xls files have formulas? If not easy to convert xlsx to xsl-fo using tables, rows and cells in fo. Never looked at xml for xlsx file with formulas. Make me wonder if you can save the Excel document "as visible" without any formulas for results only? Kinda like typing to do well?



+1


source


Windward Docgen does exactly what you want. With Windward, you create documents in Word, Excel or PowerPoint, and then our engine combines this template with the data to create the final document. The engine is available in Java and .NET and does not use Office on the server, so it is very fast and gives you the final PDF with embedded Excel and all macros. (Disclaimer - I am the CTO on the Windward side.)

0


source







All Articles