Pdf preview in media fields

Things used to be attached to the post on the forum as attachments, but due to security reasons, the attachements have been removed as well as the functionallity.

Most of the stuff previously attched can now be donwloaded through URL’s.

Check the post three up for the URL.

Paul

Thx for the explanation.

Best,
mjekl

Hello,

Is this bean still around? The links seem to be dead…or is there a better way to preview a pdf on a form?

Thanks

monetteboy:
Is this bean still around? The links seem to be dead…or is there a better way to preview a pdf on a form?

…this link does seem to be very dead and the functionality would be really useful, can someone revive the link or post an alternative !!

Cheers
Gordon

I don’t know if I can upload zip files here, but I try…

jpedal.zip (812 KB)

Thanks!

After digging around I found that if you download the sysDoc sample solution off servoy.com that it will download the jpedal.jar.

Anyone know if there are any docs that explain some of the functions? I have been digging around on jpedal.org but may not be looking in the right place.

Right now I have it working but most of the pdfs have a red background…even though they are in-fact white in adobe.

Thanks Again!

2 things that I noticed…
-The pdf-preview is black and white. (used a pdf version 1.4 document)
-with some pdf-files (version 1.5 and 1.6 document) , the bean generates the following error

java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider

Does anyone know how to specify graphics and pageformat in the jpedal bean?

elements.PDFbean.print(Graphics, PageFormat, PageNumber)

Does anyone know how I can use this bean to acctually PRINT the pdf to default or selected printer??

The OLE (Windows) bean gives you Acrobat in-form.
All Acrobat features are accessible.
Printing is native Adode printing.

No, I want to be able to print a pdf without the need of acrobat. The Jpedal bean provides functions for that, but can not find the right code to make it work.

Reading this thread I saw a post from tweetie:

java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider

The JPedal bean that you’re using to view the PDF’s needs additional resources, due to specific techniques used in the PDF. Most likely, there is some form of encryption in the PDF.

Have a look at: http://www.jpedal.org/downloadenh.php Under item 3, you can download additional JAR’s. You can place these JAR’s in a subdirectory of the beans folder and the alter the manufest of the jpedal.jar file, to include these extra files in the classpath.

You need to add the following line to the manifest file of the JAR:

Class-Path: subdir_name/filename1.jar subdir_name/filename2.jar

Offcourse, replace subdir_name and filenamex with the appropriate names..

Paul

Harjo, just reflect on what you are saying.
Nobody is right and nobody is wrong. But…

You want to view and print a pdf.
So, to get the best (most reliable, consistent, predictable, performant) outcome, you should use the appropriate software - Adobe acrobat.
And you can do this either inside or outside of Servoy.

If you want to manipulate PDF content, use an appropriate tool such as JPedal (which is a rather non-performant, but free, library).

The point is that each tool has its place.
Best-of-breed is a saying that has some meaning in this case.

If you want to Servoy-script a print from Adobe, you can either script it to an external instance of Adobe or you can use the bean.

Some tools out there (especially the free ones) are not optimal in many ways.
Just remember that.
This thread illustrates the potential difficulties if you’re trying to deliver functionality to your customers with “what seems like should be a simple thing to do”.
This is not Servoy functionality.
This is JPedal functionality.
And, unless you’re prepared to write and test some nice JPedal wrapper code to guarantee for yourself that you get the behaviour you want, use the dedicated software.

My $0.02.
Julian

We use JPedal to view, and the Servoy script below to print…but it only works on Mac..

application.executeProgramInBackground( '/usr/bin/lpr', "-T", JobName, "-P", usePrinter, "-#" ,prq_printqty, "-o", "media=" + prq_tray, fileToPrint );

Substitute variables where appropriate.

cybersack:
You want to view and print a pdf.

No I just want to print! :)

hi buddy :)

so…both you and the user do not need to view the PDF before printing.

Good. You are discussing your requirement in the wrong topic.
This topic is called:
“Pdf preview in media fields”

Hello all,

I have been using the svyDoc solution to learn a little more about document handeling in servoy and it has been a great tool! But now as I go to implement some of what I have learned I realize that I can not find the jpedal bean anywhere in the editor view drop down list of beans. I have verified that the jpedal.jar is in my servoy/beans directory. Even if I didn’t have it in there the svyDoc solution has a global method to take care of that. So my bottom line is that I can whittness the jpedal bean(PDF preview) working in the example, I can even launch it by itself but I cannot find it to use elsewhere in my solution. I have tried placing every bean I have available and none of them match.

sorry to bother

-Nick-

The jpedal.jar is not a bean and certainly not a Servoy plugin. It is used as a library and won’t show up in the tree…

Bean_192 in svyDoc solution preforms the function I desire so if I am out of line on this whole thing but can someone just tell me where this magical bean comes from if not out of the bean tree.

-Nick-

Hmm, now that I think of it I might be wrong.

Anyway, I don’t have it installed so someone else has to answer this…