Sorry, I can't get it working :oops:
Installed the bean, placed the bean on a form, created a mediafield and pasted a PDF in it, and the two globals.
Finally I made a method and pasted the code in it.
What do I put into the methods (pdf from a blobfield as well as from outside the db)?

Yep, I did rename the beannames in my method, that was not the problem.
I did set the zoomfactor 2 and enlarged the bean size, and now
the pdf from my HD shows up fine.
However I am still struggling with de pdf stored in the mediafield.
This is the code I use:

you are using BOTH pdf from file and pdf from array!!
you shouldn't ofcourse use both!

var file = elements.bean_185.openPdfArray(pdf_in_mediafield);

elements.bean_185.openPdfFile(file);

if you debugged this then you should see that file after the first call is undefined.. Is nothing. Because openPdfArray doesn't return a file.. It shows the pdf that is defined in the array. Just as openPdfFile shows the pdf defined in the file object...