pdf_writing_tools 0.0.21 → 0.0.22

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pdf_writing_tools.rb +16 -8
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5689acbfbb2ea127782f06799e8dfeac843c86d7116f63f60a21caec2f4bcd8c
4
- data.tar.gz: 986bdeb9b09545b0873478f2f024c15a8bc019e4a3dd231d45d37b4379f9f8b2
3
+ metadata.gz: 1d2bb105508a3b9d4530fc61ee7e069ff809e834f2d67e3b1868d358bc4dd0c8
4
+ data.tar.gz: 728a3eaf9c32d7a056095c0b65bb4a97938773a326d0db0bd41b032819461e18
5
5
  SHA512:
6
- metadata.gz: bdea9aea430d42471a7b08509317bc3585a25c3782898f79727c386037e19bcd84357d628686e471b90626d414646c6e5d3da32ac2726a3156579fd8feea3e9d
7
- data.tar.gz: 54b31a363356052fd7f902076e7a1fec6f7141e17fdbdd2da2ae7027ed9b0266ceb6c4b62ff0e0aabd17b30da75abccfe17642e48818a5478c1c5e2662467f7d
6
+ metadata.gz: f17b5557e4a7eb58a60e01fe7d3f7792c83e5329164afd5e25b0183f48475b37a5ab7925b0f3049e29f22661d3e40aec52f9c44e132f1695a988c22ff53d056e
7
+ data.tar.gz: bb2a5b0c0fd1b3d5089ac562286d548b10774faeb6abe6159e0e76787e19eb025db0b819a9f204b05dac95dae3e34bcbaf70f12f95de9b402fbaecdfcbdcc0bf
@@ -197,7 +197,7 @@ module PdfWritingTools
197
197
 
198
198
  if no_background
199
199
  else
200
- pdf.fill_and_stroke_rectangle([x, y_pos2], (w + left_padding + right_padding), (h+top_padding+bottom_padding))
200
+ pdf.fill_and_stroke_rectangle([x, y_pos2], w, h+top_padding+bottom_padding)
201
201
  end
202
202
  # ... e infine, sopra lo sfondo disegno il testo
203
203
  pdf.fill_color(font_color) # colore del testo
@@ -250,8 +250,8 @@ module PdfWritingTools
250
250
  cell_opts[:right_padding] = padding[:right_padding]
251
251
  cell_opts[:top_padding] = padding[:top_padding]
252
252
  cell_opts[:bottom_padding] = padding[:bottom_padding]
253
- cell_opts[:pdf_width] = 21.cm
254
- cell_opts[:pdf_height] = 297.mm
253
+ cell_opts[:pdf_width] = pdf_width
254
+ cell_opts[:pdf_height] = pdf_height
255
255
 
256
256
  draw_cell_fixed_height( pdf, false, x+offset, y, width, height, texts[i], cell_opts, auto_y)
257
257
 
@@ -317,8 +317,12 @@ module PdfWritingTools
317
317
  cell_opts[:right_padding] = padding[:right_padding]
318
318
  cell_opts[:top_padding] = padding[:top_padding]
319
319
  cell_opts[:bottom_padding] = padding[:bottom_padding]
320
- cell_opts[:pdf_height] = 297.mm
321
- cell_opts[:pdf_weigth] = 21.cm
320
+ cell_opts[:pdf_height] = pdf_height
321
+ cell_opts[:pdf_width] = pdf_width
322
+ cell_opts[:pdf_margin_top] = pdf_margin_top
323
+ cell_opts[:pdf_margin_bottom] = pdf_margin_bottom
324
+ cell_opts[:pdf_margin_left] = pdf_margin_left
325
+ cell_opts[:pdf_margin_right] = pdf_margin_right
322
326
 
323
327
  r = draw_cell_auto_height(pdf, true, x+offset, y, width, texts[i], cell_opts, auto_y)
324
328
 
@@ -378,9 +382,13 @@ module PdfWritingTools
378
382
  cell_opts[:right_padding] = padding[:right_padding]
379
383
  cell_opts[:top_padding] = padding[:top_padding]
380
384
  cell_opts[:bottom_padding] = padding[:bottom_padding]
381
- cell_opts[:pdf_height] = 297.mm
382
- cell_opts[:pdf_weigth] = 21.cm
383
-
385
+ cell_opts[:pdf_height] = pdf_height
386
+ cell_opts[:pdf_width] = pdf_width
387
+ cell_opts[:pdf_margin_top] = pdf_margin_top
388
+ cell_opts[:pdf_margin_bottom] = pdf_margin_bottom
389
+ cell_opts[:pdf_margin_left] = pdf_margin_left
390
+ cell_opts[:pdf_margin_right] = pdf_margin_right
391
+
384
392
  # ...disegno le celle vere e proprie ad altezza fissa, con l'altezza
385
393
  # ricavata dal passo precedente.
386
394
  r = draw_cell_fixed_height(pdf, draw_simulation, x+offset, y, width, max_cell_height, texts[i], cell_opts, auto_y)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdf_writing_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - JSalvo1978
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-11 00:00:00.000000000 Z
11
+ date: 2024-04-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Plugin for write pdf in a simplified manner, using prawn as backend
14
14
  email: