mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
implement the show text with positioning operator, fix bugs with parsing stream lengths contained in indirect objects. fix bug with parsing font dictionaries contained in indirect objects.
This commit is contained in:
@@ -61,6 +61,20 @@ namespace UglyToad.Pdf.Graphics
|
||||
{
|
||||
throw new InvalidOperationException($"Tried to create a show text operation with operand type: {operands[0]?.GetType().Name ?? "null"}");
|
||||
}
|
||||
case ShowTextsWithPositioning.Symbol:
|
||||
if (operands.Count == 0)
|
||||
{
|
||||
throw new InvalidOperationException("Cannot have 0 parameters for a TJ operator.");
|
||||
}
|
||||
|
||||
if (operands.Count == 1 && operands[0] is ArrayToken arrayToken)
|
||||
{
|
||||
return new ShowTextsWithPositioning(arrayToken.Data);
|
||||
}
|
||||
|
||||
var array = operands.ToArray();
|
||||
|
||||
return new ShowTextsWithPositioning(array);
|
||||
}
|
||||
|
||||
if (!operations.TryGetValue(op.Data, out Type operationType))
|
||||
|
||||
Reference in New Issue
Block a user