Hello everybody,
I need your Help Please
It´s something wrong with the following program
I get the following error and i don now what to do!!!
Exception in thread "main" java.lang.UnsatisfiedLinkError:
PdfColorInfo.colordetectnative(Ljava/lang/String;)V
at PdfColorInfo.colordetectnative(Native Method)
at PdfColorInfo.idColor(PdfColorInfo.java:60)
at PdfColorInfo.main(PdfColorInfo.java:79)
Program
import java.io.*;
import java.util.*;
import javax.swing.*;
import com.lowagie.tools.*;
import com.lowagie.tools.arguments.*;
import com.lowagie.tools.arguments.filters.*;
import com.lowagie.tools.plugins.IdentifyColorPagesStub.LibLoader;
public class PdfColorInfo{
private ArrayList colortable = new ArrayList();
AbstractTool abToll ;//= new AbstractTool();
protected ArrayList arguments = new ArrayList();
public PdfColorInfo(){
LibLoader.loadlib();
}
public native void colordetectnative(String infile);
private void colorcallback() {
colortable.add(new Boolean(true));
}
private void greycallback() {
colortable.add(new Boolean(false));
}
public Object getValue(String name) throws InstantiationException
{
StringArgument argument;
for (Iterator i = arguments.iterator(); i.hasNext(); ) {
argument = (StringArgument) i.next();
if (name.equals(argument.getName())) {
return argument.getArgument();
}
}
return null;
}
public void idColor(){
//
try{
File file = new File("c:\\DefaultPageSize.pdf");
if (file.exists() ) {
System.out.println(" file exists");
}
else{
System.out.println(" file do not exists");
}
colortable = new ArrayList();
colordetectnative(file.getAbsolutePath());
System.out.println(colortable.size() + " Pages");
java.util.Iterator it = colortable.iterator();
int i=0;
while (it.hasNext()) {
System.out.println( "Page "+(++i)+" "+(( (Boolean)
it.next()).booleanValue()?" color":" mono"));
}
}
catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args){
PdfColorInfo test = new PdfColorInfo();
test.idColor();
}
}
I need your Help please
Thanks in advance
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar