working on 10

main
Matthew Butterick 6 years ago
parent c55f60b63e
commit 42f5f93199

@ -115,6 +115,7 @@ https://github.com/mbutterick/pdfkit/blob/master/lib/mixins/text.coffee
(send this _fragment text (· this x) (· this y) options)
(define lineGap (or (· options lineGap) (· this _lineGap) 0))
;; 180325 suppress the size tracking: we'll do our own line measurement
;; 181120 unsuppress the size tracking for now because it breaks test 04
(if (not wrapper)
(increment-field! x this (send this widthOfString text))
(increment-field! y (+ (send this currentLineHeight #t) lineGap)))

Binary file not shown.

@ -3819,7 +3819,7 @@ endobj
<<
/Producer (PDFKit)
/Creator (PDFKit)
/CreationDate (D:20170525054433Z)
/CreationDate (D:20181120233930Z)
>>
endobj
2 0 obj
@ -3835,3 +3835,23 @@ endobj
/Kids [5 0 R]
>>
endobj
xref
0 9
0000000000 65535 f
0000101502 00000 n
0000101453 00000 n
0000000313 00000 n
0000000207 00000 n
0000000103 00000 n
0000000015 00000 n
0000000059 00000 n
0000101361 00000 n
trailer
<<
/Size 9
/Root 2 0 R
/Info 8 0 R
>>
startxref
101559
%%EOF

@ -22,7 +22,7 @@
(send doc fill (hash-ref part 'stroke)))))))
(define-runtime-path this "test10rkt.pdf")
(make-doc this #f proc #:pdfkit #f)
(make-doc this #f proc)
(define-runtime-path that "test10crkt.pdf")
(make-doc that #t proc #:pdfkit #f)
#;(define-runtime-path that "test10crkt.pdf")
#;(make-doc that #t proc)

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -83,7 +83,7 @@ endobj
<<
/Producer (PDFKit)
/Creator (PDFKit)
/CreationDate (D:20170824194220Z)
/CreationDate (D:20181120230211Z)
>>
endobj
10 0 obj

@ -12,7 +12,7 @@
'width #f)]))
(define-runtime-path this "test11rkt.pdf")
(make-doc this #f proc #:pdfkit #f)
(make-doc this #f proc)
(define-runtime-path that "test11crkt.pdf")
(make-doc that #t proc)

@ -53,7 +53,7 @@ endobj
<<
/Producer (PDFKit)
/Creator (PDFKit)
/CreationDate (D:20170824194220Z)
/CreationDate (D:20181120230211Z)
>>
endobj
10 0 obj

@ -0,0 +1,112 @@
%PDF-1.3
%ÿÿÿÿ
6 0 obj
<<
/ca 1
/Type /ExtGState
>>
endobj
7 0 obj
<<
/URI (http://google.com/)
/S /URI
>>
endobj
8 0 obj
<<
/Subtype /Link
/A 7 0 R
/Rect [150 614.25 331.71 642]
/Border [0 0 0]
/Type /Annot
>>
endobj
9 0 obj
<<
/CA 1
/Type /ExtGState
>>
endobj
5 0 obj
<<
/Resources 4 0 R
/Contents 3 0 R
/MediaBox [0 0 612 792]
/Type /Page
/Annots [8 0 R]
/Parent 1 0 R
>>
endobj
4 0 obj
<<
/Font <<
/F1 10 0 R
>>
/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
/ExtGState <<
/Gs2 9 0 R
/Gs1 6 0 R
>>
>>
endobj
3 0 obj
<<
/Filter /FlateDecode
/Length 167
>>
stream
xœeŽË
Â@ E÷ùŠü€m2ídZ­Zp!hg'nªV<>ý}3ø@<40>< 7œä2Æ„µ¹Ú`÷s¶]ƒ!BÚ2Æp…¼Œ§Œ/ÍRJn¿HÛ¿¾]'Ä$¤À0©jÊÌYÁTœ9þÌèa£gøÏKã¿ï/Ž²RЫÉ%cAè<41>°•XgÄ’ÚÚY+H-ƒ Ï<>öèW°ðúã Ÿ 3v
endstream
endobj
11 0 obj
<<
/CreationDate (D:19700101000000Z)
/Producer (PITKIT)
/Creator (PITKIT)
>>
endobj
10 0 obj
<<
/Subtype /Type1
/Encoding /WinAnsiEncoding
/BaseFont /Helvetica
/Type /Font
>>
endobj
2 0 obj
<<
/Pages 1 0 R
/Type /Catalog
>>
endobj
1 0 obj
<<
/Kids [5 0 R]
/Type /Pages
/Count 1
>>
endobj
xref
0 12
0000000000 65535 f
0000000990 00000 n
0000000941 00000 n
0000000511 00000 n
0000000382 00000 n
0000000262 00000 n
0000000015 00000 n
0000000059 00000 n
0000000114 00000 n
0000000218 00000 n
0000000843 00000 n
0000000750 00000 n
trailer
<<
/Size 12
/Root 2 0 R
/Info 11 0 R
>>
startxref
1047
%%EOF

@ -0,0 +1,132 @@
%PDF-1.3
%ÿÿÿÿ
6 0 obj
<<
/ca 1
/Type /ExtGState
>>
endobj
7 0 obj
<<
/URI (http://google.com/)
/S /URI
>>
endobj
8 0 obj
<<
/Subtype /Link
/A 7 0 R
/Rect [150 614.25 331.71 642]
/Border [0 0 0]
/Type /Annot
>>
endobj
9 0 obj
<<
/CA 1
/Type /ExtGState
>>
endobj
5 0 obj
<<
/Resources 4 0 R
/Contents 3 0 R
/MediaBox [0 0 612 792]
/Type /Page
/Annots [8 0 R]
/Parent 1 0 R
>>
endobj
4 0 obj
<<
/Font <<
/F1 10 0 R
>>
/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
/ExtGState <<
/Gs2 9 0 R
/Gs1 6 0 R
>>
>>
endobj
3 0 obj
<<
/Length 238
>>
stream
1 0 0 -1 0 792 cm
/DeviceRGB cs
0 0 1 scn
/Gs1 gs
1 0 0 1 50 50 cm
q
/DeviceRGB CS
0 0 1 SCN
/Gs2 gs
3 w
100 124.75 m
281.71 124.75 l
S
Q
q
1 0 0 -1 0 792 cm
BT
1 0 0 1 100 670.46 Tm
/F1 30 Tf
[<486572652069732061206c696e6b21> 0] TJ
ET
Q
endstream
endobj
11 0 obj
<<
/CreationDate (D:19700101000000Z)
/Producer (PITKIT)
/Creator (PITKIT)
>>
endobj
10 0 obj
<<
/Subtype /Type1
/Encoding /WinAnsiEncoding
/BaseFont /Helvetica
/Type /Font
>>
endobj
2 0 obj
<<
/Pages 1 0 R
/Type /Catalog
>>
endobj
1 0 obj
<<
/Kids [5 0 R]
/Type /Pages
/Count 1
>>
endobj
xref
0 12
0000000000 65535 f
0000001040 00000 n
0000000991 00000 n
0000000511 00000 n
0000000382 00000 n
0000000262 00000 n
0000000015 00000 n
0000000059 00000 n
0000000114 00000 n
0000000218 00000 n
0000000893 00000 n
0000000800 00000 n
trailer
<<
/Size 12
/Root 2 0 R
/Info 11 0 R
>>
startxref
1097
%%EOF

@ -18,6 +18,6 @@ doc = new PDFDocument({compress: no})
doc.pipe(fs.createWriteStream('test12.pdf'))
make doc
#doc = new PDFDocument({compress: yes})
#doc.pipe(fs.createWriteStream('test12c.pdf'))
#make doc
doc = new PDFDocument({compress: yes})
doc.pipe(fs.createWriteStream('test12c.pdf'))
make doc

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -18,6 +18,6 @@ doc = new PDFDocument({compress: no})
doc.pipe(fs.createWriteStream('test13.pdf'))
make doc
#doc = new PDFDocument({compress: yes})
#doc.pipe(fs.createWriteStream('test12c.pdf'))
#make doc
doc = new PDFDocument({compress: yes})
doc.pipe(fs.createWriteStream('test13c.pdf'))
make doc

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save