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

Undefined map and font notices #12

Open
tbolognese opened this issue Dec 23, 2016 · 6 comments
Open

Undefined map and font notices #12

tbolognese opened this issue Dec 23, 2016 · 6 comments

Comments

@tbolognese
Copy link

Version : 1.3.7

Notice: Undefined variable: map in PdfToText.phpclass on line 4720

Notice: Undefined variable: map in PdfToText.phpclass on line 4724

Notice: Undefined index: fonts in PdfToText.phpclass on line 5517

Warning: Invalid argument supplied for foreach() in PdfToText.phpclass on line 5517

proposed change #1

$file = PdfToText::$CIDTablesDirectory . DIRECTORY_SEPARATOR . $map_name . '.cid' ;

change to:

$map = array(); $file = PdfToText::$CIDTablesDirectory . DIRECTORY_SEPARATOR . $map_name . '.cid' ;

proposed change #2

foreach ( $page_contents [ 'fonts' ] as $font_name => $font_object )

change to:

`if ( ! isset ( $page_contents [ 'fonts' ] ) )
continue ;

foreach ( $page_contents [ 'fonts' ] as $font_name => $font_object )`

@christian-vigh-phpclasses
Copy link
Owner

@tbolognese
Copy link
Author

Christian,
Thank you for building this awesome pdf extraction class. Well done!

I regret that I can't share the PDF sample with you. It contains proprietary information that I signed a Non Disclosure Agreement for. I truly wish I could share it so you can continue to improve the project. Unfortunately I can not. If I can help in another way please let me know!

Kind Regards,
Anthony

@christian-vigh-phpclasses
Copy link
Owner

@tbolognese
Copy link
Author

Christian,
Merry Christmas!

So I checked the document in SublimeText and found the following line:

/Encoding /Identity-H/DescendantFonts[181 0 R]/Subtype/Type0>>

The document is written in English.

Let me know if I can do any more searching for you, I'm happy to help!

Kind Regards,
Anthony

@tbolognese
Copy link
Author

Sorry, I should have included the line above also. Here it is!

<</BaseFont/GHTXAC+Wingdings-Identity-H/Type/Font
/Encoding /Identity-H/DescendantFonts[181 0 R]/Subtype/Type0>>

Best,
Anthony

@christian-vigh-phpclasses
Copy link
Owner

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

No branches or pull requests

2 participants