Fixing margin left.
This commit is contained in:
parent
247cb3cbfd
commit
bb0b48dc2f
|
@ -90,7 +90,8 @@ sub _generate_pdf ( $self, $cards, $images ) {
|
|||
my $page = $pdf->page;
|
||||
$page->size('A4');
|
||||
my @rectangle = $page->size;
|
||||
my $n_pixels_per_cm = $rectangle[2] / 21.0;
|
||||
my $width_paper = $rectangle[2];
|
||||
my $n_pixels_per_cm = $width_paper / 21.0;
|
||||
for my $card (@$cards) {
|
||||
my $images_card = $images->{ $card->{scryfallId} };
|
||||
for my $image_kind ( keys %$images_card ) {
|
||||
|
@ -100,11 +101,15 @@ sub _generate_pdf ( $self, $cards, $images ) {
|
|||
$page = $pdf->page;
|
||||
$page->size('A4');
|
||||
}
|
||||
my $margin_left = 25;
|
||||
my $margin_bottom = 25;
|
||||
my $mtg_card_width = 6.35;
|
||||
my $mtg_card_height = 8.89;
|
||||
my $small_line_to_cut_better_size = 0.5;
|
||||
my $margin_left = (
|
||||
$width_paper
|
||||
- ($mtg_card_width * 3)
|
||||
- ($small_line_to_cut_better_size * 2)
|
||||
) / 2;
|
||||
open my $fh, '<', \$images_card->{$image_kind};
|
||||
my $image = $pdf->image( $fh, format => 'jpeg' );
|
||||
my $page_position_x = $number_image % 3;
|
||||
|
|
Loading…
Reference in New Issue