Pdf preview in media fields

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

Postby Harjo » Fri Oct 20, 2006 9:11 am

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.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby pbakker » Fri Oct 20, 2006 10:05 am

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
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby cybersack » Fri Oct 20, 2006 11:18 pm

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
http://www.cybersack.com/
Cybersack Java Beans and Plugins
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

Postby sbutler » Fri Oct 20, 2006 11:27 pm

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.
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
sbutler
Servoy Expert
 
Posts: 759
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Postby Harjo » Sat Oct 21, 2006 8:04 am

cybersack wrote:You want to view and print a pdf.


No I just want to print! :)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby cybersack » Sat Oct 21, 2006 8:21 am

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"
http://www.cybersack.com/
Cybersack Java Beans and Plugins
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

Postby nlsmith » Mon Oct 30, 2006 6:21 pm

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-
nlsmith
 
Posts: 19
Joined: Wed May 17, 2006 1:45 am

Postby IT2Be » Mon Oct 30, 2006 6:50 pm

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...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby nlsmith » Mon Oct 30, 2006 7:43 pm

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-
nlsmith
 
Posts: 19
Joined: Wed May 17, 2006 1:45 am

Postby IT2Be » Mon Oct 30, 2006 7:54 pm

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...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby pbakker » Tue Oct 31, 2006 10:16 am

The JPedal jar should show as PDFEncoder in the bean list.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby pbakker » Wed Nov 01, 2006 6:08 pm

Check out: http://forum.servoy.com/viewtopic.php?p=35905#35905

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

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby drookwood » Thu Jul 05, 2007 12:13 pm

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?
David Rookwood

SAN Developer
drookwood
 
Posts: 290
Joined: Tue Nov 11, 2003 7:08 pm
Location: Somerset, UK

Postby martinh » Wed Aug 08, 2007 5:39 pm

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
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Postby pbakker » Thu Aug 09, 2007 1:45 pm

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
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

PreviousNext

Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 18 guests