Codice PHP:
private String ottieniFile(){
String file = "prova_ordine.pdf";
JFileChooser fc = new JFileChooser();
fc.setApproveButtonText("Apri");
fc.setDialogTitle("Seleziona PDF");
// FILTRO SOLI PDF ?????
int value = fc.showOpenDialog(null);
if ( value == JFileChooser.APPROVE_OPTION ) {
File f = fc.getSelectedFile();
System.out.println("É stato selezionato il file " + f);
file = ""+f;
}
if ( value == JFileChooser.CANCEL_OPTION ) {
System.out.println("Hai fatto annulla");
}
if ( value == JFileChooser.ERROR_OPTION ) {
System.out.println("ERRORE");
}
return file;
}
e la stringa la passo a
Codice PHP:
PdfWriter.getInstance(document,new FileOutputStream(ottieniFile()));
mi pare funzioni.. è lentissimo la va...