[카카오] ® → ? => (R) and PDF font 복구 #434
@ -1504,23 +1504,6 @@ public class EstimateService {
|
||||
} while (!prevName.equals(itemName) && itemName.contains("&"));
|
||||
}
|
||||
|
||||
// 3. 폰트 미지원 특수문자 치환
|
||||
// PDF는 PdfUtil에서 표준 폰트 fallback으로 ® 등을 렌더링하므로 치환 불필요
|
||||
// Excel은 MS PGothic 고정이므로 ASCII로 치환
|
||||
if (!isPdfDownload) {
|
||||
itemName = itemName
|
||||
.replace("\u00AE", "(R)") // ® → (R)
|
||||
.replace("\u2122", "(TM)") // ™ → (TM)
|
||||
.replace("\u00A9", "(C)") // © → (C)
|
||||
.replace("\u2013", "-") // – (en dash) → -
|
||||
.replace("\u2014", "-") // — (em dash) → -
|
||||
.replace("\u2018", "'") // ' → '
|
||||
.replace("\u2019", "'") // ' → '
|
||||
.replace("\u201C", "\"") // " → "
|
||||
.replace("\u201D", "\"") // " → "
|
||||
.replace("\u2026", "..."); // … → ...
|
||||
}
|
||||
|
||||
itemResponse.setItemName(itemName);
|
||||
} catch (Exception e) {
|
||||
log.warn("Excel itemName processing failed: {}", itemName);
|
||||
|
||||
@ -93,6 +93,7 @@ public class InterfaceQsp {
|
||||
sb = new StringBuilder();
|
||||
int status = con.getResponseCode();
|
||||
if (status == HttpURLConnection.HTTP_OK) {
|
||||
log.info("[DEBUG] QSP Content-Type: {}", con.getContentType());
|
||||
br = new BufferedReader(new InputStreamReader(con.getInputStream(), "utf-8"));
|
||||
|
||||
String line;
|
||||
|
||||
@ -265,7 +265,7 @@ public class PdfUtil {
|
||||
* @return 설정된 FontProvider
|
||||
*/
|
||||
private static DefaultFontProvider setFontProvider(String fontPath) throws IOException {
|
||||
DefaultFontProvider fontProvider = new DefaultFontProvider(false, true, false);
|
||||
DefaultFontProvider fontProvider = new DefaultFontProvider(false, false, false);
|
||||
InputStream fontStream = PdfUtil.class.getClassLoader().getResourceAsStream(fontPath);
|
||||
|
||||
if (fontStream != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user