mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-09 19:29:34 +08:00
Ensure content streams are not compressed in optimization test
This commit is contained in:
parent
0879fa1b1a
commit
4a4c73ba0b
@ -2724,7 +2724,7 @@ func TestCompressStreams(t *testing.T) {
|
||||
// Need to add Arial to the page resources to avoid generating invalid PDF (avoid build fail).
|
||||
times := model.NewStandard14FontMustCompile(model.TimesRoman)
|
||||
page.Resources.SetFontByName("Times", times.ToPdfObject())
|
||||
page.AddContentStreamByString(`BT
|
||||
rawContent := `BT
|
||||
/Times 56 Tf
|
||||
20 600 Td
|
||||
(The multiline example text)Tj
|
||||
@ -2739,7 +2739,17 @@ func TestCompressStreams(t *testing.T) {
|
||||
(example text)'
|
||||
(example text)'
|
||||
(example text)'
|
||||
ET`)
|
||||
ET`
|
||||
{
|
||||
cstreams, err := page.GetContentStreams()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
cstreams = append(cstreams, rawContent)
|
||||
// Set streams with raw encoder (not encoded).
|
||||
page.SetContentStreams(cstreams, core.NewRawEncoder())
|
||||
}
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user