@@ -283,8 +283,10 @@ pdfSize img =
283283 "/MediaBox" `B.isPrefixOf` l)) (B.lines img) of
284284 (x:_)
285285 | "/MediaBox" `B.isPrefixOf` x
286− -> case B.words $ B.filter (\c -> c /= '[' && c /= ']')
287− $ B.drop 10 x of
286+ -> case B.words . B.takeWhile (/=']')
287+ . B.drop 1
288+ . B.dropWhile (/='[')
289+ $ x of
288290 [x1, y1, x2, y2] -> do
289291 x1' <- safeRead $ B.unpack x1
290292 x2' <- safeRead $ B.unpack x2