1. 支持常用的中文标点符号不再第一个字符位置
2. 支持wmf图片(需升级dll)
This commit is contained in:
@@ -407,6 +407,8 @@ begin
|
||||
{self.}DynamicHeight += diff;
|
||||
if_newline := {self.}EndX + range.Width - {self.}StartX > {self.}Width + 1e-6;
|
||||
if i = 0 then if_newline := 0;
|
||||
if if_newline and (range is class(TSPdfTextRange)) and (AnsiToUtf8(range.Text) in array(";", ":", "。", "“", "”", "!", "?", ",")) then
|
||||
if_newline := 0;
|
||||
if if_newline and range.Width < {self.}Width then
|
||||
begin
|
||||
offset := line_space > max_y ? (line_space - max_size) / 2 + max_size - max_size / 5 : max_y;
|
||||
@@ -750,6 +752,8 @@ begin
|
||||
image := docx_to_pdf_.GetPdf().LoadJpegImageFromFile("", image_path);
|
||||
"emf":
|
||||
image := docx_to_pdf_.GetPdf().LoadEmfImageFromFile("", image_path);
|
||||
"wmf":
|
||||
image := docx_to_pdf_.GetPdf().LoadWmfImageFromFile("", image_path);
|
||||
end;
|
||||
fileDelete("", image_path);
|
||||
return array(image_type, image);
|
||||
@@ -764,6 +768,7 @@ begin
|
||||
('name': 'png', 'position': 0, 'value': array(0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A)),
|
||||
('name': 'jpg', 'position': 0, 'value': array(0xFF, 0xD8)),
|
||||
('name': 'emf', 'position': 40, 'value': array(0x20, 0x45, 0x4d, 0x46)),
|
||||
('name': 'wmf', 'position': 0, 'value': array(0xd7, 0xcd, 0xc6, 0x9a)),
|
||||
);
|
||||
for i:=0 to length(def)-1 do
|
||||
begin
|
||||
|
||||
Reference in New Issue
Block a user