Welcome Guest Search | Active Topics | Sign In | Register

Runtime error when setting Font on PDF Options
Andy Clark (Atlas Code)
Posted: Wednesday, December 10, 2014 9:47:59 AM
Rank: Newbie
Groups: Member

Joined: 12/10/2014
Posts: 5
Hi,

We have an issue while using EO.Pdf library. When setting the Font property of a Field we get Exception with the following message:

Quote:
"Property 'Rect' can not be empty"


Code: C#
var document = new PdfDocument("PathToForm");
var aggregateNominalValue = document.Fields["aggregate nominal value2"];

aggregateNominalValue.Font = new EO.Pdf.Drawing.PdfFont("Arial", 12);

using (var ms = new MemoryStream())
{
	var docArrany = documents.ToArray();
	var merged = PdfDocument.Merge(docArrany);    // Exception is thrown here

	merged.Save(ms);
	PdfDocument.Merge(documents.ToArray()).Save(ms);
	
	return ms.GetBuffer().Shrink(ms.Length);
}


Quote:

at EO.Pdf.Internal.ai.a[a](String A_0, Boolean A_1)
at EO.Pdf.Drawing.PdfRectangle.a(ai A_0, String A_1, Boolean A_2)
at EO.Pdf.Internal.m8.d()
at EO.Pdf.Internal.m8.h()
at EO.Pdf.PdfField.b()
at EO.Pdf.PdfField.c()
at EO.Pdf.Internal.ka.b()
at EO.Pdf.PdfDocument.a()
at EO.Pdf.PdfDocument.Merge(PdfDocument[] docs)
at AngliaRegistrars.Services.FormGenerationService.GenerateShareSplit[T](T viewModel) in


The PDF we are manipulating can be found here:
http://www.companieshouse.gov.uk/forms/generalForms/SH02_notice_of_consolidation_sub_division_redemption_of_a_shares_or_reconversion_of_stock_into_share.pdf

We are performing other forms of manipulation on this PDF but we only seem to get this error when changing the font.

Can anyone help?
Andy Clark (Atlas Code)
Posted: Wednesday, December 10, 2014 10:08:28 AM
Rank: Newbie
Groups: Member

Joined: 12/10/2014
Posts: 5
We are using dll version 5.0.50.2
eo_support
Posted: Wednesday, December 10, 2014 10:18:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Please update to the latest build. The "Rect can not be empty" is a known issue that has already been addressed. What happens is we receive many test files from our users over the years, and many files are either slightly corrupted or uses valid but rarely used syntax. As we work through these files, the product becomes much more tolerate and robust. However the link you provided seems to be invalid, so we are not able to test this with your test file.

Thanks!
Andy Clark (Atlas Code)
Posted: Wednesday, December 10, 2014 10:20:51 AM
Rank: Newbie
Groups: Member

Joined: 12/10/2014
Posts: 5
eo_support
Posted: Wednesday, December 10, 2014 10:23:24 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

You can verify this on your side with the latest EO.Pdf build. The link you posted still does not work.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.