codeforutah / utah-court-calendar-service

Request court calendar events from the API.
https://utah-court-calendar-service.herokuapp.com/
MIT License
5 stars 1 forks source link

Resolve glyph error #2

Open s2t2 opened 8 years ago

s2t2 commented 8 years ago

When parsing page 728 of the Salt Lake City District Court .pdf file, the script is encountering an error Unknown glyph width for 127 Courier:

/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/pdf-reader-1.3.3/lib/pdf/reader/width_calculator/built_in.rb:93:in `glyph_width': Unknown glyph width for 127 Courier (ArgumentError) 
s2t2 commented 8 years ago

the gem author says this issue has been resolved on the master branch, but using the gem from github source does not resolve the issue.

# Gemfile
gem 'pdf-reader', :git => 'git://github.com/yob/pdf-reader.git'
s2t2 commented 8 years ago

see screenshot below.

the offending character is ØN§ûø•

screenshot 2016-02-20 13 50 39

edit: the offending character appears again on page 819

screenshot 2016-02-20 15 39 30

edit: the Payson City Justice Court calendar also triggers this error on page 47, although the offending character is unclear.

PAYSON CITY JUSTICE COURT

 DAVID C DAHLQUIST March 09, 2016
 PAYSON JUSTICE COURT Wednesday
 10:00 AM REVIEW HEARING PAY 151000320 Other Misdemeanor
 PAYSON CITY ATTY:
 VS.
 KIRK, MISTY MICHELLE ATTY: LARSEN, JOHN S
 OTN: 44317683 DOB: 11/27/1972

 MB - ASSAULT - 10/22/15
 > CASE INVOLVES DOMESTIC VIOLENCE <
 ------------------------------------------------------------------------------
 PRETRIAL CONFERENCE U00 155002150 Traffic Court Case
 PAYSON CITY ATTY:
 VS.
 MUNIZ, PEDRO ATTY:
 OTN: DOB: 10/23/1962

 MC - NO PROOF OF INSURANCE - 11/15/15
 MB - FAIL TO APPEAR ON CITATION - 01/11/16
 CITATION #: C145176939 SHERIFF #: LEA #:
 > NO OTN NUMBER <
 > CASE EFILED <
 ------------------------------------------------------------------------------
 REVIEW HEARING S25 155002408 Misdemeanor DUI
 PAYSON CITY ATTY:
 VS.
 PATINO, TONYA ATTY: LARSEN, JOHN S
 AKA HOOD, TONYA
 OTN:   44352698 DOB: 10/28/1990

 MB - DRIVING WITH MEASURABLE CONTROLLED
 SUBSTANCE - 12/29/15
 IN - NO VALID LICENSE - NEVER OBTAINED LICENSE - 12/29/15
 CITATION #: D12739901 SHERIFF #: LEA #: 15UC11339
 > CASE EFILED <
 ------------------------------------------------------------------------------
 REVIEW HEARING PAY 141000078 Other Misdemeanor
 PAYSON CITY ATTY:
 VS.
 REBOL, JOHN EDWARD ATTY: LARSEN, JOHN S
 OTN: 33929829 DOB: 08/01/1990

 MB - CRIMINAL TRESPASS - 04/01/14
 CITATION #: P10142912 SHERIFF #: LEA #: 14PA01621
 > CASE EFILED <
 ------------------------------------------------------------------------------