combine_pdf 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/combine_pdf/pdf_public.rb +4 -4
- data/lib/combine_pdf/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: cb506a3a76c6eb84531ff5069cd3286147dc8fac
         | 
| 4 | 
            +
              data.tar.gz: afb908cfd43b301bfabb3bc53bceccce2e82c4ac
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 59d1e37087daed2e4f84ecef8bc2d817ddf14a25ec06f47748739d83d1732a206d6ede05ea3531ea444668d28295d891bd43bc6575413ad00217b76ed610ff47
         | 
| 7 | 
            +
              data.tar.gz: 10a6f92d6c37d966ac5d6df0886961237227e1264726bb609fdb33083d1b6a816672f43996123e3e747ac42e227a1a8b211fae42f86dcb90e4b1e7405fb72d5d
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -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 | | 
| 256 | 
            -
                    if  | 
| 257 | 
            -
                       | 
| 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]  | 
| 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
         | 
    
        data/lib/combine_pdf/version.rb
    CHANGED