Pdf-maker

Latest version: v0.0.48

Safety actively analyzes 634391 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

0.0.42

* Fix the issue of font file path error in Ubuntu system.

0.0.41

* Revise setup.py, fixed the issue of missing resource files.

0.0.40

* Fix text wrapping error
* The issue of displaying unicode characters should be related to the encoding method, which is WinAnsiEncoding
as default. WinAnsiEncoding is similar to ASCII code. To support unicode characters, perhaps it is needed to
use Composite Fonts (CIDFont), compared to Simple Fonts, they require more dictionaries to define.

0.0.39

* Issue found: plus-minus sign cannot be displayed correctly.

This issue seems to be caused by the encode procedure, for example, the character "±" (unicode 00B1) will
be converted to b'\xc2\xb1' with encode('utf-8'). Thus I found only characters between 0 to 127 in ASCII set
can be displayed correctly.

s = "=±=≤"
for i in s:
print(i.encode('utf-8'))

b'='
b'\xc2\xb1' this is converted by "±" but will convert to "±".
b'='
b'\xe2\x89\xa4' this is converted by "≤" but will convert to "â\x89¤".

for example:
s = "±"
s.encode('utf-8')
b'\xc2\xb1'
b'\xc2\xb1'.decode('utf-8')
"±"
Up to here, everything is good, however if convert bytes to hexadecimal representation, errors happed
b'\xc2\xb1'.hex()
'c2b1'
convert bytes to charaters, will give chr(0xc2) and chr(0xb1)
delete the first two digits, i.e., only 'b1' left, then display "±" well.

Now we can successfully write the symbol "±", but fail to display other characters in Unicode set with longer
codes, such as "≤" (unicode 8804). Currently I dont exactly know how to completely solve this issue, and I tried
to use ASCII85Decode but not helpful. I'll evaluate if it is necessary to search deeper to find the perfect
solution to support more Unicode characters.

0.0.38

* Fix the display error of double quotation marks, which was missed in the subset font files.

0.0.37

* Note that font name should be postScriptName of a font, i.e., BaseFont attribute in Font object, and
FontName attribute in FontDescriptor object, otherwise, some pdf reader like Chrome Browser can read it
correctly, but Adobe Acrobat will show warning and replace by other built-in fonts.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.