public Page()

in src-csharp/TextractExtensions.cs [158:190]


		public Page(List<Block> blocks, List<Block> blockMap) {
			this.Blocks = blocks;
			this.Text = string.Empty;
			this.Lines = new List<Line>();
			this.Form = new Form();
			this.Tables = new List<Table>();
			this.Content = new List<dynamic>();

			blocks.ForEach(b => {
				if(b.BlockType == "PAGE") {
					this.Geometry = new NewGeometry(b.Geometry);
					this.Id = b.Id;
				} else if(b.BlockType == "LINE") {
					var l = new Line(b, blockMap);
					this.Lines.Add(l);
					this.Content.Add(l);
					this.Text = this.Text + l.Text + Environment.NewLine;
				} else if(b.BlockType == "TABLE") {
					var t = new Table(b, blockMap);
					this.Tables.Add(t);
					this.Content.Add(t);
				} else if(b.BlockType == "KEY_VALUE_SET") {
					if(b.EntityTypes.Contains("KEY")) {
						var f = new Field(b, blockMap);
						if(f.Key != null) {
							this.Form.AddField(f);
							this.Content.Add(f);
						}
					}
				}
			});

		}