I am still seriously considering using Prawn to do some PDF work. If it is not too much trouble I would be interested in the single .rb file that can eliminate the headaches of wrapping all of the Prawn files etc…
Might be that other can provide improvements back in return. Considering how different some gems are - some modifying the Ruby API itself - I’m guessing that there are some gem cases that might pose problems.
(This is my shameless attempt to promote more open source collaboration.)
prawn_source_and_combined.zip (268.7 KB)
Here you have an archive containing the current sources as downloaded from github today, and a single .rb containing a combination of all sources. I have also included the licenses of each of the sources (Prawn, TTfunk and PdfCore) in the archive.
Please notice this currently doesn’t load into Sketchup. It looks like the current version of prawn is not compatible with SU2018`s ruby version.
Download and use at your own risk.
This is pretty cool.
As far as wrapping it, I’m assuming I only need to make “one” wrap since it is neatly packaged into a single file.
The latest version of Prawn shows that it only needs Ruby 2.0.0 to work so it should work with SU 2018.
The readme doc states:
We officially support Ruby 2.3 and newer.
You will notice that loading the combined .rb in Sketchup fails. That is because the sources use some syntax not supported in ruby 2.2
Prawn 2.2.x requires Ruby 2.1 or later https://rubygems.org/gems/prawn/versions/2.2.0
Prawn 2.1.0 requires Ruby 2.0 or later https://rubygems.org/gems/prawn/versions/2.1.0
Note that their Travis CI testing is only done on Ruby 2.3.0 and later…
I didn’t use the sources installed with the gem, but used the github sources.
Maybe I should’ve first installed the gem and then just point my RubyPacker to the installed .rb.
That should do.