Question: ```
import asyncio
import pyppeteer
import logging
from pyppeteer import launch

pyppeteer.DEBUG = True
for name in logging.root.manager.loggerDict:
    logging.getLogger(name).disabled = True

async def main():
    browser = await launch(headless = False)
    page = await browser.newPage()
    await page.setJavaScriptEnabled(True)
    response = await page.goto('http://www.africau.edu/images/default/sample.pdf',
                                time = 3000, waitUntil = ['domcontentloaded', 'load', 'networkidle0'])
    content = await response.buffer()
    print(content)
    await browser.close()

asyncio.get_event_loop().run_until_complete(main())

```

expected output: content of <http://www.africau.edu/images/default/sample.pdf>

got output: b'df48fcc4-a0b0-4e86-b52e-0ec012ee791e'

Python 3,Linux Ubuntu

Answer: 
Create Document, Make it Versionable, Modify It
Creates a document, makes it versionable, checks it out, modifies the content of the working copy, checks it in again and then repeats the process but checks in the document with a version history note and as a major version increment:

```
// create file, make it versionable
var doc = userhome.createFile('checkmeout.txt');
doc.addAspect('cm:versionable');
doc.content = 'original text';

// check it out and update content on the working copy
var workingCopy = doc.checkout();
workingCopy.content = 'updated text 1';

// check it in
doc = workingCopy.checkin();

// check it out again
workingCopy = doc.checkout();
workingCopy.content = 'updated text 2';

// check it in again, but with a version history note and as major version increment
doc = workingCopy.checkin('a history note', true);

```

You can take reference from below javascript api link
<https://hub.alfresco.com/t5/alfresco-content-services-hub/javascript-api-cookbook/ba-p/293260>
There's a [version service](http://dev.alfresco.com/resource/docs/java/org/alfresco/service/cmr/version/VersionService.html) bean that can be used to apply versioning to documents (nodes) that can be used in a custom bean. Don't forget to inject the versionService in your service-context.xml btw `<property name="versionService" ref="VersionService"/>`

If I remember correctly you may have to enable a versionable aspect (cm:versionable) on the node in question. If this has already been enabled then there's also the ability to view the VersionHistory for the node.

Create 2nd version and copy over with the contents of node 2.