10
1
Help guys my assignment says it needs to be in .pdf format but I did it in Word. I'm really stuck.
How do I take a word document in .docx format and make a .pdf that contains all the text from it? Bonus points if it also contains all the images and any formatting, but text is a bare minimum. The sample file I'll be using will be this one, though your solution should be generic.
I don't want it to go through any unnecessary processing steps - simply encoding then decoding the document in base64 or whatever is not in the spirit of the question, though creative use of cowsay
will be an exception to this. Standard rules of code trolling apply - the solution should be technically correct, all steps should be technically necessary, the result should be technically useless. This should be more of a "Rube Goldberg" style program, than an obfuscation and obtuseness competition.
Most upvotes on answers other than my own by 5/1/14 wins.
Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More information here.
2This assignment is way complex, but I'm certain that the only proper approach would be to use a Preview Handler in a WPF application, take a screenshot of that, save the bitmap as a GIF and then print that as a PDF – Mathias R. Jessen – 2013-12-29T18:50:47.133
Code-trolling is in the process of being removed, as per the official stance. This post has a fair amount of votes on the question and the answers, and even though it recieved over 50% "delete" votes on the poll, it is one of the more well specified [code-trolling] posts. Therefore, I am locking it for historical significance.
– Doorknob – 2014-05-12T12:18:04.443