PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with error: The size of the XPdfForm is to small

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
tertiumquid



Joined: 29 Oct 2006
Posts: 1

PostPosted: Sun Oct 29, 2006 2:32 pm    Post subject: Help with error: The size of the XPdfForm is to small Reply with quote

Greetings. I am receiving an error when trying to fill in an existing PDF's form fields, but I'm not sure what it means. I was wondering if anyone here could shed some light on the error message.

The error message reads: "The size of the XPdfForm is to small. Parameter Name: size."

The offending code is found in the if statement of the following code block, where "fields" is a PdfAcroFieldCollection and "FFELPForm" is an ASP Wizard control.

Code:
PdfAcroField fNonLoanCode = fields["NonLoanCode" + i.ToString()];

if ((txtField = fNonLoanCode as PdfTextField) != null) { txtField.Text = ((DropDownList)FFELPForm.FindControl( "NonLoanCode" + i.ToString() )).SelectedValue; }


I'm not sure what property of the PDF document the error refers to; is it the actual pixel width of field? Is it the allowed characters of the field? Etc. At the point the error is thrown, the "SelectedValue" that I'm trying to fill the field with is only two characters long.

Any ideas?
Back to top
View user's profile Send private message
Stefan Lange



Joined: 12 Oct 2006
Posts: 47
Location: Cologne, Germany

PostPosted: Mon Oct 30, 2006 12:13 am    Post subject: Reply with quote

Hello

>>Any ideas?

Yes, I wrote in the FillFormFields Sample (which is not in the Samples solution anymore):

Code:
Note: AcroForms are still under construction in this version. Filling form fields is more obscure than I expected. The implementation is partially undone.


This simply means the AcroForm stuff is incomplete and untested. We currently donít need AcroForms in our own projects. I have not removed the source code from PDFsharp because it may be useful for somebody.

Sorry
Stefan Lange
Back to top
View user's profile Send private message Send e-mail
garrinmf



Joined: 29 Nov 2006
Posts: 1

PostPosted: Wed Nov 29, 2006 7:13 pm    Post subject: Reply with quote

I ran into the same issue and found that the issue arose when there were multiple fields with the exact same name. So tertiumquid could get around it by adjusting names slightly.

I'm using PdfSharp to auto fill forms and I made it so the form could have any number it wanted at the end and I only looked at the text so "address" filled in the same as "address12312" or "address32".

But thats just a work around. I poked around a bit inside the pdf and I know what it's doing now I think. I poked around the code a bit and it just didn't pop out at me as to how it works (the parsing and reading of all the tags and where they're stored and such) but if I could get an overview and a start I'd work on fixing it myself.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

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


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com