combine_pdf 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb9d21d934a1001210f09268503f3ebc0282aedf
4
- data.tar.gz: fc180c13f7789f87e32e06f0307093a485dfe560
3
+ metadata.gz: cb506a3a76c6eb84531ff5069cd3286147dc8fac
4
+ data.tar.gz: afb908cfd43b301bfabb3bc53bceccce2e82c4ac
5
5
  SHA512:
6
- metadata.gz: 7b9d84a43b214ab50f9c9aca37ddb4d1532f2c72d5ec8b441119f0bfb33e2b295267def67acc6787254cd0760f8e44ba358054cd311eb6619a9d5edc125095b6
7
- data.tar.gz: 7bed5345b025c0633c2cad6bd7b861d34e962f17f002d840f99a9159ec7d5d3529ebfff10026fe8d082bd47c4eeafaa404fedd828dd9ed5ff526c676d0a7c22c
6
+ metadata.gz: 59d1e37087daed2e4f84ecef8bc2d817ddf14a25ec06f47748739d83d1732a206d6ede05ea3531ea444668d28295d891bd43bc6575413ad00217b76ed610ff47
7
+ data.tar.gz: 10a6f92d6c37d966ac5d6df0886961237227e1264726bb609fdb33083d1b6a816672f43996123e3e747ac42e227a1a8b211fae42f86dcb90e4b1e7405fb72d5d
@@ -1,5 +1,15 @@
1
1
  # Change Log
2
2
 
3
+ ***
4
+
5
+ #### Change log v.1.0.3
6
+
7
+ **Fix**: Fix issue #111 where some fonts would cause `pdf.fonts` to break the PDF. Credit to Pavel Slabý (@paulslaby) for exposing the issue.
8
+
9
+ ***
10
+
11
+ #### Change log v.1.0.2
12
+
3
13
  **Fix**: Fix NilError when calling `fonts` for a page that has no fonts. Credit to Pavel Slabý (@paulslaby) for PR#110.
4
14
 
5
15
  **Fix**: Fix issue #109 where nested differences between objects weren't detected properly, causing loss of data if objects (specifically images that use image masks) would merge. The fix implements a manual equality checks with up to three (3) levels of recursion, protecting against stack overflow that can be caused by the combinations of complex PDF files and Ruby's limitless recursion on `eql?`. Credit to Ryan Scott (@Subtletree) exposing the issue.
@@ -252,11 +252,11 @@ module CombinePDF
252
252
  # @param limit_to_type0 [true,false] limits the list to type0 fonts.
253
253
  def fonts(limit_to_type0 = false)
254
254
  fonts_array = []
255
- pages.each do |p|
256
- if p[:Resources][:Font]
257
- p[:Resources][:Font].values.each do |f|
255
+ pages.each do |pg|
256
+ if pg[:Resources][:Font]
257
+ pg[:Resources][:Font].values.each do |f|
258
258
  f = f[:referenced_object] if f[:referenced_object]
259
- if (limit_to_type0 || f[:Subtype] = :Type0) && f[:Type] == :Font && !fonts_array.include?(f)
259
+ if (limit_to_type0 || f[:Subtype] == :Type0) && f[:Type] == :Font && !fonts_array.include?(f)
260
260
  fonts_array << f
261
261
  end
262
262
  end
@@ -1,3 +1,3 @@
1
1
  module CombinePDF
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: combine_pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev