Suppose I want to print one answer (out of many). Is there an option to achieve that without printing parts of adjacent answers?

  • 2
    $\begingroup$ Also meta.math.stackexchange.com/questions/8748/… $\endgroup$
    – Asaf Karagila Mod
    Feb 4, 2014 at 18:22
  • 1
    $\begingroup$ @AsafKaragila Am I correct: That one can prepare the the entire file to be printed, the question and all the answers as one document, and then restrict printer to a segment. Each answer is not a separate file. $\endgroup$
    – Maesumi
    Feb 4, 2014 at 20:29
  • $\begingroup$ I'm... not sure? You can try and set it to print to a .pdf file and look at the result yourself. $\endgroup$
    – Asaf Karagila Mod
    Feb 4, 2014 at 20:32
  • 1
    $\begingroup$ Meta.SO: Can I print a single answer? $\endgroup$ Feb 5, 2014 at 7:40

1 Answer 1


I tried a very naive solution. I used StackPrinter to prepare a question together with answers.

I saved the page generated by StackPrinter. I obtained a html-file which looked like this.

Then I simply edited it manually. I have removed almost all parts outside of <div class="answers"> ... </div>. (I left the question title, but if you want, you can remove it too.) In the part I left, I kept the part between <div class="answer-details"> ... </div> and <div class="answer"> ... </div> for the specific answer that I wanted. (If there are several answers, there are more such blocks.) The resulting file looked like this. You can have a look here how it is rendered.

This is rather cumbersome, but if you do not need this often, it is doable.

You should definitely have a look at suggestions in meta.SO post Can I print a single answer?. If you are familiar with userscripts, you can try the script which is provided in one of the answers there.


Not the answer you're looking for? Browse other questions tagged .