| | |
| | | import com.itextpdf.text.pdf.PdfPTable; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | |
| | |
| | | /** |
| | | * 字体存放的跟路径,默认为'C:\Windows\Fonts\' |
| | | */ |
| | | private static final String FONT_PATH = "C:\\Windows\\Fonts\\"; |
| | | private static final String FONT_PATH = System.getProperty("user.dir") + File.separator + "ltkj-admin"+File.separator+"src"+File.separator+"main"+File.separator+"resources"+File.separator+"Font"+File.separator; |
| | | |
| | | /** |
| | | * 纸张大小 |
| | |
| | | return font; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("设置字体失败!"); |
| | | throw new RuntimeException("设置字体失败!"+FONT_PATH); |
| | | } |
| | | } |
| | | |