mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
bec13d523f
commit
b3c4bbc844
45 files changed
+1885
-1453
No files matched your search
@@ -18,6 +18,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/tdewolff/canvas"
|
||||
codecpdf "github.com/xiaoqidun/ofdgo/internal/codec/pdf"
|
||||
)
|
||||
|
||||
// ptPerMM 为毫米转换为排版点的比例
|
||||
@@ -212,9 +213,9 @@ func (r *Renderer) renderText(ctx *canvas.Context, obj TextObject, pageH float64
|
||||
}
|
||||
if pdfText {
|
||||
if len(pdfOutput.text) == 0 {
|
||||
pdfOutput.text = append(pdfOutput.text, pdfPageText{})
|
||||
pdfOutput.text = append(pdfOutput.text, codecpdf.TextPage{})
|
||||
}
|
||||
defer pdfOutput.preserveText(pdfOutput.text[len(pdfOutput.text)-1].count, obj.Text())
|
||||
defer pdfOutput.preserveText(pdfOutput.text[len(pdfOutput.text)-1].Count, obj.Text())
|
||||
}
|
||||
codePos := 0
|
||||
textPos := 0
|
||||
|
||||
Reference in new issue
Block a user