How do I compare two pages in same space

Confluence Server 5.9.7

I have two different pages in the same space. They are similar, with minor differences. Call them:


How do I generate a comparison of these two pages? I'm looking for something similar to the "Compare Selected Versions" that compares two historical versions of the same page (within PAGE HISTORY).

Since Confluence has the above ability within the same page, I'd hope it could do the same with two separate pages. smile



2 answers

1 accepted

This widget could not be displayed.

I don't think it can be done within Confluence. I'd export them both to PDF then use Acrobat to do a comparison.

On the other hand, why don't you just copy the VENDORS page, then edit the VENDORS_NEW page, select all and copy, then edit the Copy of VENDORS page, select all and paste. Then you can use the history compare feature.

Thank you. (I like your 2nd solution.) As it turns out, i realized that v1 (in Page History) of VENDORS_NEW is very close to the last version of VENDORS. So, I ended up comparing v1 to v50 (current version). 

You'd think, though, that Confluence would support page-to-page compare...I wonder if that's a feature request. smile


  1. Is this method (your 2nd suggestion) known to occasionally produce a false positive? I see one difference reported (text added) that seems to be wrong as there is no visible change.
  2. Does the Page History compare tend to show a lot of content before and after one difference? e.g. the difference is on line 1200 of the doc, but I see (e.g.) 1150-1250?




This widget could not be displayed.

another way to accomplish this, could be done with python.

If you are familiar with the output from the posix diff -u command:

#!/usr/bin/env python

import difflib
import sys try: from xmlrpc.client import ServerProxy from xmlrpc.client import Fault except: from xmlrpclib import ServerProxy from xmlrpclib import Fault def get_page(page_id, confluence_url='https://<confluence_domain>', confluence_login='<username>', confluence_password='<password>'): client = ServerProxy(confluence_url+"/rpc/xmlrpc", verbose=0) try: auth_token = client.confluence2.login(confluence_login, confluence_password) except: print("Can't login to confluence") return [] try: # getting confluence page page = client.confluence2.getPage(auth_token, page_id) except Fault as e: print(e.faultString) return [] return page['content'].split('\n') if len(sys.argv) < 3:
print("usage:" + sys.argv[0] + " page_id_1 page_id_2") for line in difflib.unified_diff(get_page(sys.argv[1]), get_page(sys.argv[2]), fromfile='pageID='+sys.argv[1], tofile='pageID='+sys.argv[2]): print(line[:-1])

this little script could help you



Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

170 views 12 7
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you