Page 3 of 4

PostPosted: Fri Oct 20, 2006 9:11 am
by Harjo
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.

PostPosted: Fri Oct 20, 2006 10:05 am
by pbakker
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:
Code: Select all
Class-Path: subdir_name/filename1.jar subdir_name/filename2.jar


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

Paul

PostPosted: Fri Oct 20, 2006 11:18 pm
by cybersack
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

PostPosted: Fri Oct 20, 2006 11:27 pm
by goldcougar
We use JPedal to view, and the Servoy script below to print...but it only works on Mac..
Code: Select all
application.executeProgramInBackground( '/usr/bin/lpr', "-T", JobName, "-P", usePrinter, "-#" ,prq_printqty, "-o", "media=" + prq_tray, fileToPrint );


Substitute variables where appropriate.

PostPosted: Sat Oct 21, 2006 8:04 am
by Harjo
cybersack wrote:You want to view and print a pdf.


No I just want to print! :)

PostPosted: Sat Oct 21, 2006 8:21 am
by cybersack
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"

PostPosted: Mon Oct 30, 2006 6:21 pm
by nlsmith
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-

PostPosted: Mon Oct 30, 2006 6:50 pm
by IT2Be
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...

PostPosted: Mon Oct 30, 2006 7:43 pm
by nlsmith
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-

PostPosted: Mon Oct 30, 2006 7:54 pm
by IT2Be
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...

PostPosted: Tue Oct 31, 2006 10:16 am
by pbakker
The JPedal jar should show as PDFEncoder in the bean list.

Paul

PostPosted: Wed Nov 01, 2006 6:08 pm
by pbakker
Check out: http://forum.servoy.com/viewtopic.php?p=35905#35905

it describes how PDF's can be printed directly, using the PDFEncoder.

Paul

PostPosted: Thu Jul 05, 2007 12:13 pm
by drookwood
Paul,

I have downloaded the jpedal.jar (though the latest version seems to be called jpedalSTD.jar) and dropped it in the beans folder, but I do not see the PDFEncoder bean listed to place on a form. The pdf support package was definitely installed. Have I missed something?

PostPosted: Wed Aug 08, 2007 5:39 pm
by martinh
I have exactly the same problem.
When jpedalSTD.jar is installed (classpath extended with entries, like mentioned on the jpedal.org webpage), I see in the beans dropdown list AppletViewer.
This runs this jpedal-viewer, but not in the way the examples shown.

I need just the possibility to show a preview of the pdf-document like in the svyDoc example, but as like other persons already noticed here, for some reason it doesn't work.

The jpedalSTD.jar seems to have only 2 methods, init() and destroy(), so not a method like openPdfArray()

I'm using Servoy 3.5 Final

PostPosted: Thu Aug 09, 2007 1:45 pm
by pbakker
It seems that the jpedalSTD.jar is not signed as a Java Bean anymore, therefor, the PDFDecoder does not show up in the Beans list..

I've send an email to the supplier with a request for change.

Paul

PS: drookwood: I seem to have missed your post earlier, sorry 'bout that