FileOutputStream error when generating a PDF on NetBeans

2

I am working on a project where I use itext and fileoutputstream to generate a pdf , but when I import the library java.io I get an error:

  

can not find symbol class FileOutputStream

How can I correct this error? Attached 2 codes where I import it and where I use it.

Java file, line 6.

package dhinventario;

import java.io.FileOutputStream; //Aquí es donde tira el error.
import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Document;
import com.itextpdf.text.Element;
import com.itextpdf.text.Font;
import com.itextpdf.text.Image;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfContentByte;
import com.itextpdf.text.pdf.PdfTemplate;
import com.itextpdf.text.pdf.PdfWriter;

Java file, line 1438.

try{
    PdfWriter = PdfWriter.getInstance(document, new FileOutputStream("facturas/" +
        jTextFieldCodFacturas.getText() + ".pdf" ) ) // ...
    document.open();
    
asked by speaknow 31.10.2016 в 07:03
source

0 answers