#1 2019-11-14 09:48:39

kitty80
Member
Registered: 2019-10-16
Posts: 8

Missing non English characters when PDF is password protected

When I create a normal PDF file, my document looks fine.
But when I try to create a password protected PDF file I get an error message in Adobe Reader (Unable to find/create font Arial)

I use a code:

lPdf:=TPdfDocument.Create(false,0,false,TPdfEncryption.New(elRC4_40,_UserPassword,_UserPassword,PDF_PERMISSION_NOMODIF))

lPdf.Info.Author        := mainProgramName;
lPdf.Info.CreationDate  := Now();
lPdf.Info.Creator       := mainUserName;

I tried to use an EmbeddedTTF option, but it doesn't helps.

P.S. Autor and Creator informations also can't be read when PDF is password protected (both are written in unreadable characters and Creation Date is empty)

What can I do?

Last edited by kitty80 (2019-11-14 10:01:37)

Offline

#2 2019-11-14 11:49:52

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,232
Website

Re: Missing non English characters when PDF is password protected

Does it work with English-only (A..Z) characters?

Offline

#3 2019-11-14 14:32:51

kitty80
Member
Registered: 2019-10-16
Posts: 8

Re: Missing non English characters when PDF is password protected

ab wrote:

Does it work with English-only (A..Z) characters?


Yes, it does.
There is problem with polish characters only.

Offline

#4 2019-11-14 16:29:40

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,232
Website

Re: Missing non English characters when PDF is password protected

So it sounds like an encoding issue...

Offline

#5 2019-11-14 21:40:41

kitty80
Member
Registered: 2019-10-16
Posts: 8

Re: Missing non English characters when PDF is password protected

code page is 1252.

Offline

#6 2019-11-15 11:42:50

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,232
Website

Re: Missing non English characters when PDF is password protected

I found something wrong in TPdfWrite.AddUnicodeHex...

Please check https://synopse.info/fossil/info/9588237ed5

Offline

#7 2019-11-19 14:34:28

kitty80
Member
Registered: 2019-10-16
Posts: 8

Re: Missing non English characters when PDF is password protected

I've downloaded the newest version (2019-11-15) from GitHub and I still have the same error (unknown Arial font)

Last edited by kitty80 (2019-11-19 14:49:02)

Offline

Board footer

Powered by FluxBB