我已经添加了所有必需的JAR文件,包括itextpdf-5.1.0.jar,但它仍然会给出错误。请参考以下代码。我在网上查过,但没用。
导入时出错
com.lowagie.text.Document;
com.lowagie.text.Paragraph;
com.lowagie.text.pdf.PdfWriter;
不明白怎么回事。我添加了最新版本的iText jar文件,但没有得到解决方案。
请给我正确的解决方案或代码。请逐步提及。因为我第一次这么做…
import com.lowagie.text.Document;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfWriter;
import java.io.File;
import java.io.FileOutputStream;
public class Doc2Pdf2 {
/**
* This method is used to convert the given file to a PDF format
*
* @param inputFile
* - Name and the path of the file
* @param outputFile
* - Name and the path where the PDF file to be saved
* @param isPictureFile
*/
private void createPdf(String inputFile, String outputFil