Code Monkey home page Code Monkey logo

Comments (2)

boazsegev avatar boazsegev commented on June 12, 2024

Hi @MarcWeber ,

Thank you for opening this issue. The concern was that the page Resources data in your file was a reference and should have been dereferenced (but wasn't).

I am pushed a fix, and will publish soon.

I hope this helps.

Good luck,
Bo.

from combine_pdf.

MarcWeber avatar MarcWeber commented on June 12, 2024

Works. but only with (false).

          if (limit_to_type0 || f[:Subtype] == :Type0) && f[:Type] == :Font && !fonts_array.include?(f)

My results:
Scribus created PDF
Preferences -> Fonts -> [ ] Subset by that font
Didn't find ToUnicode object for {:Type=>:F....
-> failure

libre office:

script.rb:30:in []': no implicit conversion of Symbol into Integer (TypeError) from script.rb:30:in block (2 levels) in fonts'
from script.rb:29:in each' from script.rb:29:in block in fonts'
from script.rb:22:in each' from script.rb:22:in fonts'
from script.rb:46:in `

'

I monkey patched that function line 30 is:
f = f[:referenced_object] if f[:referenced_object]

Adding this guard makes it work:

    r.values.each do |f|
      next if f.class == Integer

Now I have an ΓΌ and the turkish special umlauts :) Job complet.
Thank you very much!

Libre Office file pdf file: https://mawercer.de/tmp/tmp/lo.pdf

I was close to trying pdfbox or itext.

from combine_pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.