How to scan a double sided document to one PDF by using the HP Color LaserJet Pro M477fdw

The HP Color LaserJet Pro M477fdw has a document feeder and it is able to scan a double sided (2-sided) document to one PDF leaving the pages as separate pages inside the PDF.

  • Install HP Scan (not HP Easy Scan).
  • Select Source = “Document Feeder if loaded”
  • Select Page Sides = “2 – sided (book)”


And now the important part, when clicking on the File Type “PDF” a new screen appears.


Make sure you disable / uncheck “Separate file for each scanned page”, then save the settings and scan the document.

The double sided document will be scanned to one PDF file with 2 pages in it.

Note: When you put multiple documents in the document feeder all sides of all pages will now be scanned to one PDF.





Having troubles with Angular 6 and node sass on Windows 10 x64?

I was getting all kinds of errors after upgrading my project to Angular 6 on Windows 10 x64, including errors on node sass.
These errors were resolved after I removed the x64 version of Node en installed the Node LTS 10.13.0 x86 (32bits) version on Windows 10 x64.

Errors ng build: Exit status 3221225477.

0 info it worked if it ends with ok

1 verbose cli [ ‘C:\\Program Files\\nodejs\\node.exe’,

1 verbose cli ‘C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js’,

1 verbose cli ‘run’,

1 verbose cli ‘build’ ]

2 info using npm@6.4.1

3 info using node@v10.13.0

4 verbose run-script [ ‘prebuild’, ‘build’, ‘postbuild’ ]

5 info lifecycle entry@0.0.0~prebuild: entry@0.0.0

6 info lifecycle entry@0.0.0~build: entry@0.0.0

7 verbose lifecycle entry@0.0.0~build: unsafe-perm in lifecycle true

8 verbose lifecycle entry@0.0.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;

C:\Dev\MyProject\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files\Java\jdk1.8.0_181\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\nodejs\;C:\Users\roelv\AppData\Local\Microsoft\WindowsApps;C:\Users\roelv\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\roelv\.dotnet\tools;C:\Users\roelv\AppData\Roaming\npm

9 verbose lifecycle entry@0.0.0~build: CWD: C:\Dev\MyProject\gateway-entry

10 silly lifecycle entry@0.0.0~build: Args: [ ‘/d /s /c’,

10 silly lifecycle ‘npm run translationsBuild && npm run lint:fix && ng build’ ]

11 silly lifecycle entry@0.0.0~build: Returned: code: 3221225725 signal: null

12 info lifecycle entry@0.0.0~build: Failed to exec build script

13 verbose stack Error: entry@0.0.0 build: `npm run translationsBuild && npm run lint:fix && ng build`

13 verbose stack Exit status 3221225725

13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)

13 verbose stack at EventEmitter.emit (events.js:182:13)

13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)

13 verbose stack at ChildProcess.emit (events.js:182:13)

13 verbose stack at maybeClose (internal/child_process.js:962:16)

13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

14 verbose pkgid entry@0.0.0

15 verbose cwd C:\Dev\MyProject

16 verbose Windows_NT 10.0.17134

17 verbose argv “C:\\Program Files\\nodejs\\node.exe” “C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js” “run” “build”

18 verbose node v10.13.0

19 verbose npm v6.4.1

20 error code ELIFECYCLE

21 error errno 3221225725

22 error entry@0.0.0 build: `npm run translationsBuild && npm run lint:fix && ng build`

22 error Exit status npm install node-sass@beta

23 error Failed at the entry@0.0.0 build script.

23 error This is probably not a problem with npm. There is likely additional logging output above.

24 verbose exit [ 3221225725, true ]

Sonar Cloud and Azure DevOps – Fixing [SQ] Task failed with status FAILED

A pull request build in Azure DevOps failed with the error: “[SQ] Task failed with status FAILED”.

This was the only information given, when de build failed.

Luckily, the manual build gave more information:

Error: /home/vsts/work/1/s/gradlew failed with return code: 1

FAILURE: Build failed with an exception.


2018-10-30T10:51:56.3943526Z * What went wrong:

2018-10-30T10:51:56.3960616Z Execution failed for task ‘:sonarqube’.

2018-10-30T10:51:56.3961713Z > ‘feature/10691-fix-side-menu-not-working]-when-NOT-admin’ is not a valid branch name. It can only contain ‘A-Z’, ‘a-z’, ‘0-9’, ‘-‘, ‘_’, ‘.’, and ‘/’)

The problem was in the branch name, it accidentally contained a “]” character.

Fix: Calling a function with multiple parameters in PowerShell, merges all parameters in the first parameter as an array


When you call a PowerShell function, that expects multiple parameters, with parenthesis, all parameters will be merged in the first parameter, as an array.

The solution is, to call the function with named parameters.

So NOT JoinText($p1, $p2, $p3) but JoinText -p1 $p1 -p2 $p2 -p3 $p3



function JoinText([string]$p1, [string]$p2, [string]$p3) {

return “$p1 $p2 $p3”




$p1 = “some text 1”

$p2 = “some text 2”

$p3 = “some text 3”

$result = JoinText($p1, $p2, $p3)

write-host $result



$p1 = “some text 1”

$p2 = “some text 2”

$p3 = “some text 3”

$result = JoinText -p1 $p1 -p2 $p2 -p3 $p3

write-host $result

Calling a function from another PowerShell script file in the same folder with “relative path”


If you want to execute a function from another PowerShell script file, you can “dot-source” the file.

The “.” is a special operator in PowerShell that can load another PowerShell script file en import all code in it.


Assume both PowerShell scripts are in the same folder, we can use the code in script1.ps1 in script2.ps1 in the following way:


PowerShell script1.ps1


function ReturnGivenText {





    return $text



PowerShell script2.ps1

$text = ReturnGivenText -text “Hello world”

write-host $text


This will output:

Hello world


Note: I use the PowerShell >3 global variable $PSScriptRoot, to make the relative path, absolute, so we can use the “.” operator.


Fix: Power BI POST request returns a 500 Internal Server Error

When posting to the Power BI api uri: in PowerShell version 5.1.17134.228, I got the error:

The remote server returned an error: (500) Internal Server Error.


I invoked the Power BI rest api with the PowerShell script you can find below.

The error was fixed, when I added -ContentType ‘application/json’ parameter to the InvokeRestMethod



PowerShell script


$clientId = “my-client-id”

$PowerBIUserName = “MyUserName”

$PowerBIUserPassword = “MyUserPassword”

$creds = New-Object “Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential” -ArgumentList $PowerBIUserName,$PowerBIUserPassword

$resourceAppIdURI = “”

$authority = “”;

$authContext = New-Object “Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext” -ArgumentList $authority


# Acquire token

$authResult = $authContext.AcquireToken($resourceAppIdURI, $clientId, $creds)


# Create a new group

$auth_header = @{



$uri = “”

$body = “{`”name`”:`”myNewGroup`”}”

$response = Invoke-RestMethod -Uri $uri -Headers $auth_header -Method POST -Body $body -ContentType ‘application/json’

$target_group_id = $





How to fix: VSCode: Cannot launch program ‘…/app/ts’ because corresponding JavaScript cannot be found.


I compiled a very simple node.js express application with tsc (TypeScript) on the command line and wanted to debug it with VSCode, but when I pressed F5 I got the error: Cannot launch program ‘…/app/ts’ because corresponding JavaScript cannot be found.


I expected the paths in the launch.json to be wrong, but that was not the case.

The problem was that I did not generate * files.

After I changed the tsconfig.json file, to generate * files, I could debug the application.




“compileOnSave”: false,

“compilerOptions”: {

“target”: “ES2015”,

“module”: “commonjs”,

“sourceMap”: true,

“strict”: true