-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is $font.height applied with $gfx.say for the resulting text position? #31
Comments
Also not well documented yet. By default the x position is the baseline of the font. There is a use PDF::Lite;
use PDF::Content;
use PDF::Content::Text::Box;
my PDF::Lite $pdf .= new;
my $page = $pdf.add-page;
$page.text: {
.text-position = 10, 20;
.print: '[Default]',;
.print: '[Bottom]', :baseline<bottom>;
.print: '[Top]', :baseline<top>;
.print: '[Middle]', :baseline<middle>;
}
$pdf.save-as: "test.pdf"; |
Is the affect supposed to be the same as :valign<bottom> et al.? |
It's similar, but use PDF::Lite;
my PDF::Lite $pdf .= new;
my $page = $pdf.add-page;
my $x = 10;
for <center top bottom> -> $valign {
$page.text: {
.text-position = $x, 150;
.print: "A multi line paragraph of $valign aligned text", :$valign, :width(100);
$x += 150;
}
}
$pdf.save-as: "test.pdf"; |
Great example, David. Thanks. |
Starting with PDF::Content release 0.70, I've toned down I made this change after realizing that both |
No description provided.
The text was updated successfully, but these errors were encountered: