mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-15 19:54:52 +08:00
create a test document with some rotated text to validate the transformations
This commit is contained in:
Binary file not shown.
After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
@@ -41,7 +41,13 @@
|
||||
Run(SinglePageFormattedType0Content);
|
||||
}
|
||||
|
||||
private static void Run(string file)
|
||||
[Fact]
|
||||
public void RotatedTextLibreOffice()
|
||||
{
|
||||
Run(@"Rotated Text Libre Office", 841);
|
||||
}
|
||||
|
||||
private static void Run(string file, int imageHeight = 792)
|
||||
{
|
||||
var pdfFileName = GetFilename(file);
|
||||
|
||||
@@ -58,7 +64,7 @@
|
||||
foreach (var word in page.Letters)
|
||||
{
|
||||
graphics.DrawRectangle(redPen, new Rectangle((int)word.GlyphRectangle.Left,
|
||||
792 - (int)(word.GlyphRectangle.Bottom + word.GlyphRectangle.Height), (int)Math.Max(1, word.GlyphRectangle.Width), (int)word.GlyphRectangle.Height));
|
||||
imageHeight - (int)(word.GlyphRectangle.Bottom + word.GlyphRectangle.Height), (int)Math.Max(1, word.GlyphRectangle.Width), (int)word.GlyphRectangle.Height));
|
||||
}
|
||||
|
||||
var imageName = $"{file}.jpg";
|
||||
|
Reference in New Issue
Block a user