|
@@ -11,6 +11,7 @@ import java.net.URL;
|
|
|
|
|
|
import org.xhtmlrenderer.pdf.ITextRenderer;
|
|
|
|
|
|
+import com.google.zxing.client.result.BizcardResultParser;
|
|
|
import com.lowagie.text.DocumentException;
|
|
|
import com.lowagie.text.pdf.BaseFont;
|
|
|
import com.ym.mec.util.exception.UtilException;
|
|
@@ -317,6 +318,8 @@ public class PDFUtil {
|
|
|
File fontFamilyFile = new File(baseUrl, fontFamily);
|
|
|
if (fontFamilyFile.exists()) {
|
|
|
renderer.getFontResolver().addFont(fontFamilyFile.getAbsolutePath(), BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
|
|
|
+ } else {
|
|
|
+ throw new FileNotFoundException("字体文件找不到:" + fontFamilyFile.getPath());
|
|
|
}
|
|
|
renderer.setDocumentFromString(data);
|
|
|
renderer.getSharedContext().setBaseURL(baseUrl);
|