This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Tags: go-pdf/fpdf
Tags
fpdf: allow to set global document language The Document Catalog of a PDF allows to "specify the natural language for all text in the document" [1]. This is important to make PDFs accessible. This change allows to set the Lang entry in the document catalog. [1] PDF 1.7, section 7.7.2, page 74 https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf
all: retract v1.4.3+v1.4.2 Signed-off-by: Sebastien Binet <[email protected]>
fpdf: introduce buffer pool for (de)flating buffers ``` name old time/op new time/op delta ParsePNG_rgb-8 22.8ms ± 1% 16.0ms ± 3% -29.81% (p=0.000 n=25+30) ParsePNG_gray-8 660µs ± 3% 624µs ± 4% -5.54% (p=0.000 n=28+30) ParsePNG_small-8 2.49µs ± 2% 2.12µs ± 3% -14.83% (p=0.000 n=30+30) ParseJPG-8 36.3µs ± 4% 36.8µs ± 5% ~ (p=0.070 n=30+30) ParseGIF-8 410µs ± 3% 409µs ± 4% ~ (p=0.562 n=30+29) name old alloc/op new alloc/op delta ParsePNG_rgb-8 26.4MB ± 0% 4.2MB ±10% -84.04% (p=0.000 n=29+30) ParsePNG_gray-8 2.56MB ± 0% 2.49MB ± 0% -2.73% (p=0.000 n=30+30) ParsePNG_small-8 8.96kB ± 0% 9.84kB ± 0% +9.73% (p=0.000 n=30+30) ParseJPG-8 274kB ± 0% 274kB ± 0% -0.00% (p=0.002 n=30+30) ParseGIF-8 897kB ± 0% 898kB ± 0% +0.10% (p=0.000 n=30+30) name old allocs/op new allocs/op delta ParsePNG_rgb-8 400 ± 0% 292 ± 0% -27.00% (p=0.000 n=30+28) ParsePNG_gray-8 164 ± 0% 114 ± 0% -30.49% (p=0.000 n=30+30) ParsePNG_small-8 35.0 ± 0% 10.0 ± 0% -71.43% (p=0.000 n=30+30) ParseJPG-8 12.0 ± 0% 12.0 ± 0% ~ (all equal) ParseGIF-8 214 ± 0% 191 ± 0% -10.75% (p=0.000 n=30+30) ```
all: optimize rgbColorValue This CL introduces a per-document buffer to build color strings. ``` name old time/op new time/op delta RGB_grg-8 808ns ± 0% 576ns ± 0% -28.66% (p=0.000 n=17+18) RGB_gray-8 779ns ± 0% 584ns ± 0% -25.01% (p=0.000 n=18+18) RGB_full-8 746ns ± 1% 568ns ± 1% -23.89% (p=0.000 n=19+19) name old alloc/op new alloc/op delta RGB_grg-8 64.0B ± 0% 24.0B ± 0% -62.50% (p=0.000 n=20+20) RGB_gray-8 48.0B ± 0% 24.0B ± 0% -50.00% (p=0.000 n=20+20) RGB_full-8 48.0B ± 0% 24.0B ± 0% -50.00% (p=0.000 n=20+20) name old allocs/op new allocs/op delta RGB_grg-8 5.00 ± 0% 1.00 ± 0% -80.00% (p=0.000 n=20+20) RGB_gray-8 4.00 ± 0% 1.00 ± 0% -75.00% (p=0.000 n=20+20) RGB_full-8 4.00 ± 0% 1.00 ± 0% -75.00% (p=0.000 n=20+20) ```
PreviousNext