THANKS JOHAN. that was a really quick response!! IT WORKS!!! it is exactly what I was looking for. WONDERFUL !!!
TO all members of this forum
TAKE NOTE: Our was not an easy request … but SERVOY dev DREAM team found and tested the right solution for us in less than 3 days!!!
I owe you a big box of Torino’s GIANDUJOTTI.
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)?
The methods work with the element name of the beanelement you dropped on your form. Did you name the element and synced the element name used in the methods to it?
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…
jcompagner:
here is a pdf bean that you can drop in the beans folder.
Where is this bean?
Excuse me for asking but it’s not the first time I’ve seen reference to a file/bean as if it was provided as an attachment and simply is nowhere to be seen! I feel pretty stupid can somebody explain me what’s happening?