Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-health-science
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐俊
yn-health-science
Commits
6d4e9fbd
Commit
6d4e9fbd
authored
Feb 19, 2025
by
徐俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xujun
parent
86e7d6a4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
ProjectInfoToPDF.java
...main/java/com/yiboshi/science/utils/ProjectInfoToPDF.java
+8
-2
No files found.
science-admin/src/main/java/com/yiboshi/science/utils/ProjectInfoToPDF.java
View file @
6d4e9fbd
...
...
@@ -127,15 +127,21 @@ public class ProjectInfoToPDF {
// 根据字体文件类型使用不同的加载方式
if
(
fontPath
.
toLowerCase
().
endsWith
(
".ttc"
))
{
return
BaseFont
.
createFont
(
path
+
",0"
,
BaseFont
.
IDENTITY_H
,
BaseFont
.
EMBEDDED
);
return
BaseFont
.
createFont
(
path
+
",0"
,
BaseFont
.
WINANSI
,
BaseFont
.
EMBEDDED
);
}
else
{
return
BaseFont
.
createFont
(
path
,
BaseFont
.
IDENTITY_H
,
BaseFont
.
EMBEDDED
);
return
BaseFont
.
createFont
(
path
,
BaseFont
.
WINANSI
,
BaseFont
.
EMBEDDED
);
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"加载字体文件失败,请确保resources目录下存在字体文件 "
+
fontPath
+
":"
+
e
.
getMessage
(),
e
);
}
}
public
static
String
getCurrentOperatingSystem
()
{
String
os
=
System
.
getProperty
(
"os.name"
).
toLowerCase
();
//System.out.println("---------当前操作系统是-----------" + os);
return
os
;
}
/**
* 首页项目信息
* @param document
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment