268 Commits

Author SHA1 Message Date
Peter Williams
b48010c75b Fixed typo 2018-10-18 21:39:16 +11:00
Peter Williams
45228219b5 Added PdfFont.FontDescriptor() which always returns a PdfFontDescriptor, possibly a builtin one for
the standard 14 fonts.
2018-10-18 21:12:15 +11:00
Peter Williams
2452973cfe Don't add /Encoding entry to standard 14 font dicts.
Moved the standard 14 font encoders to a separate field pdfFontSimple.std14Encoder.
2018-10-16 14:50:43 +11:00
Peter Williams
3cdca483a3 Merge branch 'v3' of https://github.com/unidoc/unidoc into render.v3.hungarian 2018-10-15 19:15:37 +11:00
Denys Smirnov
84284c88ec security: add missing license headers, more documentation 2018-10-08 01:04:56 +03:00
Denys Smirnov
7bd4ba688d core: split crypt filter methods into a separate package 2018-10-08 00:18:18 +03:00
Denys Smirnov
42df346e69 core: split security handlers into a separate package 2018-10-08 00:18:18 +03:00
Denys Smirnov
bccaa87cdc core: refactor encryption and decryption types 2018-10-08 00:18:18 +03:00
Denys Smirnov
b5288e7ddc core: change permissions type to a bitmask 2018-10-08 00:18:18 +03:00
Denys Smirnov
ef64bef191 core: permissions field is uint32 according to the spec 2018-10-08 00:18:18 +03:00
Aleksei Pavliukov
364e8c871f Fix combine objects optimizations 2018-10-03 01:58:03 +03:00
Peter Williams
5c2448d09f Added "T_h" ligature to glyph map. 2018-10-01 16:50:55 +10:00
Gunnsteinn Hall
8be0c2cf5a Added package test for optimize - showcasing an issue 2018-09-30 23:58:56 +00:00
Gunnsteinn Hall
e059440204 Fix if encryptObj not set 2018-09-30 18:45:35 +00:00
Gunnsteinn Hall
4068ea6130 Fix problem with encryptObject having incorrect reference in trailer due to copying 2018-09-30 18:38:50 +00:00
Aleksei Pavliukov
ea5dba8e0d Implemented : PDFs optimization 2018-09-30 01:01:31 +03:00
Denys Smirnov
acd4308d56 Merge branch 'refactor' into v3
# Conflicts:
#	pdf/core/crypt.go
#	pdf/model/writer.go
2018-09-26 01:08:19 +03:00
Denys Smirnov
b3c45a550a core: refactor crypt filter selection code 2018-09-26 00:52:05 +03:00
Peter Williams
f953c11452 Don't return errors for TrueType font file tables with no PostScript entry in their "name" table.
This is needed for PDFs created with Tesseract.
2018-09-24 18:02:02 +10:00
Peter Williams
c76fa6985e Moved font cache from global variable to Extractor. 2018-09-22 09:28:18 +10:00
Peter Williams
69be54d501 Cleaned up some comments. 2018-09-21 16:43:10 +10:00
Peter Williams
75dfdb6f1c Use Standard14Font consistently for standard 14 font names. 2018-09-21 16:25:57 +10:00
Denys Smirnov
b7dcbc22de core: fix standard crypt filter name; resolves issues with Adobe Reader 2018-09-19 23:48:50 +03:00
Denys Smirnov
eac1e899dc core: allow to write documents with AES encryption 2018-09-19 06:02:15 +03:00
Peter Williams
a5569176cf Merge branch 'v3' of https://github.com/unidoc/unidoc into render.v3.hungarian 2018-09-18 10:37:30 +10:00
Peter Williams
b18c8ca93d Add ToUnicode map when embedding Type0 CIDType2 fonts in PDF files. 2018-09-17 17:57:52 +10:00
Denys Smirnov
8f4f1804b0 core: implement decoding of AESv3; resolves #30 2018-09-16 04:13:24 +03:00
Peter Williams
bb709b4381 Added FontName to FontDescriptor when loading TrueType based fonts from file 2018-09-07 21:43:39 +10:00
Peter Williams
4d5156c4a0 Added NewStandard14FontMustCompile 2018-09-07 19:11:58 +10:00
Gunnsteinn Hall
e63a74cc9c Merge branch 'master' into v3-merge-master-in 2018-09-06 09:45:04 +00:00
Peter Williams
f84792531f Fixed bugs introduced into creator_test.go by font changes.
- Use pdfFontType0 Encoding value for encoding name if it is set.
- Use DW entry in CID Type2 fonts
- Encode CID fonts using 2 bytes / character
2018-09-03 10:48:31 +10:00
Peter Williams
4ae7016b94 Moved FontDescriptor from Type0 font dict to DescendantFont dict 2018-08-29 21:30:05 +10:00
Peter Williams
adb16cd150 Moved files to new UniDoc directory layout. 2018-08-23 21:51:32 +10:00
Peter Williams
b7f1f3e291 Merge branch 'v3' of https://github.com/unidoc/unidoc into render.v3.hungarian 2018-08-22 22:01:00 +10:00
Peter Williams
660c1b934b added change left out of previous commit 2018-08-22 15:05:34 +10:00
Peter Williams
b641b2b627 don't return a glyph for rune \x00 2018-08-22 15:02:52 +10:00
Peter Williams
e5ec5406f6 Changes to get creator working better.
- textencoding.RuneToGlyph always returns a value
- Encode empty /Difference correctly
- NewParagraph sets a custom encoding that matches its text
2018-08-22 14:51:50 +10:00
Peter Williams
cc4f64fa98 small tidy up 2018-08-21 12:43:51 +10:00
Peter Williams
d96f963de2 Changed Encode signature from Encode(raw string) string to Encode(raw string) []byte. 2018-08-20 20:13:10 +10:00
Peter Williams
b9561f0671 file left out of previous commit 2018-08-20 18:37:47 +10:00
Peter Williams
8b6a14a2f9 Added a function to create an encoder for a specified alphabet for simple fonts. 2018-08-20 17:58:01 +10:00
Peter Williams
c2feafdfdc Fixed some issues in creator code
Stopped double converting from Go strings to PDF encoded strings
Added TTF parse table format 12
2018-08-17 08:41:35 +10:00
Peter Williams
ffa7f9b482 Changed the literal rune maps in simple.go to use hex numbers rather than character codes.
Go sometimes subsitutes literal character codes (e.g. '\u2206') with other runes. This doesn't
happen if the literal is written as a number (e.g. 0x2206 ). I am not sure why Go does this.
2018-08-15 17:15:27 +10:00
Peter Williams
d64785a8ca Added more font tests 2018-08-14 21:28:57 +10:00
Gunnsteinn Hall
d026312948 Godoc fixes in model reader.go 2018-08-14 03:02:19 +00:00
Peter Williams
26e6e114ad removed debug code that was accidentally commited 2018-08-14 12:01:12 +10:00
Peter Williams
aa88d8510a Cleaned up glyph<->unicode maps
These maps had been getting messy which made it hard for me to update them.

This change builds the full maps from source files which are included in the commit.
2018-08-14 11:56:09 +10:00
Gunnsteinn Hall
a49bdcb8f8 Change PdfWriter dependency from io.WriteSeeker to io.Writer - enabling PDF memory output 2018-08-13 13:58:38 +00:00
Gunnsteinn Hall
e254fd763c Move test and supplementary files to nearest package testdata. 2018-08-03 11:01:39 +00:00
Gunnsteinn Hall
0b25fcc4e7 golint and godoc fixes in textencoding 2018-08-03 10:18:44 +00:00