Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font Descriptor is not used if read from cache #18

Open
JanSlabon opened this issue Jan 19, 2017 · 3 comments
Open

Font Descriptor is not used if read from cache #18

JanSlabon opened this issue Jan 19, 2017 · 3 comments
Assignees
Labels

Comments

@JanSlabon
Copy link

This line: https://github.com/DocnetUK/tfpdf/blob/master/src/tFPDF/PDF.php#L1033
will include the font definition file which is previously saved with the variable $desc holding the font descriptor keys and values (here). The $desc variable is not used further but the font descriptor is taken from the empty array: https://github.com/DocnetUK/tfpdf/blob/master/src/tFPDF/PDF.php#L1035 then.

This results in corrupted PDF documents.

@kazsaj kazsaj added the bug label Jan 19, 2017
@kazsaj kazsaj self-assigned this Jan 19, 2017
@kazsaj
Copy link

kazsaj commented Jan 24, 2017

Hello @JanSlabon

Thanks for raising this issue. I have done some fixes and this problem should be resolved in the latest release: https://github.com/DocnetUK/tfpdf/releases/tag/v2.0.6

Let me know if it works for you now.

Thanks,
Kaz

@JanSlabon
Copy link
Author

We are going to try this asap. Anyhow I just noticed the variable $ttffile which is defined in the definition files but seems to be never used. Looks like a simliar issue?

@kazsaj
Copy link

kazsaj commented Jan 24, 2017

Seems that you're right, in this case though it does have a fallback value though, so hopefully problem won't be as severe as with the descriptors. I will fix it anyway, but not today unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants