|
|
pdf field is not added at the right position
Last post 09-24-2007, 9:13 AM by px3j. 29 replies.
-
08-14-2007, 2:01 PM |
-
px3j
-
-
-
Joined on 12-05-2005
-
-
Posts 17
-
-
-
-
|
pdf field is not added at the right position
When I use formEditor.AddField(FieldType.PushButton, id, page, x, y, x+width, y+height) to add a field at the pdf, if the pdf is not the standard 8.5*11, then the field is not added at the position as the parameter indicated.
You can use adobe paper capture tool to created a not 8.5*11 pdf and test it.
Thanks,
Don.
|
|
-
08-14-2007, 7:29 PM |
-
AdeelTaseer
-
-
-
Joined on 12-15-2006
-
-
Posts 2,437
-
-
-
-
|
Re: pdf field is not added at the right position
Attachment: Present (inaccessible)
Hi,
Thank you for considering Aspose.
I am unable to reproduce this error. I have used the following code. Please find attached Pdf files input and output.
FormEditor formEditor = new FormEditor("E:/AsposeTest/1document.pdf", "E:/AsposeTest/added.pdf");
//create a FormFieldFacade to specify visual attributes
FormFieldFacade facade = new FormFieldFacade();
formEditor.Facade = facade;
//add a button field with grey background and beveled border
facade.BackgroudColor = System.Drawing.Color.FromArgb(0xCC, 0xCC, 0xCC);
facade.BorderStyle = FormFieldFacade.BDSTYLE_BEVELED;
formEditor.AddField(Aspose.Pdf.Kit.FieldType.PushButton, "button1", "OK", 1, 465, 695, 500, 720);
//clear the settings
formEditor.ResetFacade();
//close and save the output document
formEditor.Save();
Thanks
|
|
-
08-15-2007, 9:24 AM |
-
px3j
-
-
-
Joined on 12-05-2005
-
-
Posts 17
-
-
-
-
|
Re: pdf field is not added at the right position
Hey, Adeel:
Would you be able create a pdf by using the Adobe Acrobat paper capture tool? I found out if the pdf is created by that produce, then aspose.pdf.kit can not add the field at the right position.
|
|
-
08-15-2007, 12:16 PM |
-
px3j
-
-
-
Joined on 12-05-2005
-
-
Posts 17
-
-
-
-
|
Re: pdf field is not added at the right position
Hey, Adeel:
I think what the real problem here is: when you only have a big image inside the pdf, then you can not add the field inside the image.
The Paper capture tool capture the paper as a image, so the pdf actually only have one image inside, not text.
Please test this type of pdf and fixed the problem.
Thanks,
Don.
|
|
-
08-15-2007, 3:03 PM |
-
AdeelTaseer
-
-
-
Joined on 12-15-2006
-
-
Posts 2,437
-
-
-
-
|
Re: pdf field is not added at the right position
Attachment: Present (inaccessible)
Hi,
Still I am unable to reproduce this error. Are you sure you are using the latest version of Aspose.Pdf.Kit. For your reference, I am attaching the Pdf file. Could you please provide that Pdf document and let us investigate that issue.
Thanks.
|
|
-
08-16-2007, 9:53 AM |
-
px3j
-
-
-
Joined on 12-05-2005
-
-
Posts 17
-
-
-
-
|
Re: pdf field is not added at the right position
Hey, Adeel:
I send you a email that has a example PDF for your test.
Thanks,
Don.
|
|
-
08-16-2007, 8:16 PM |
-
AdeelTaseer
-
-
-
Joined on 12-15-2006
-
-
Posts 2,437
-
-
-
-
|
Re: pdf field is not added at the right position
Hi,
I have checked the PDF you send and found the same problem as you described. I will discuss this problem with the developers and we will let you know as soon as solution is found.
Thanks.
|
|
-
08-17-2007, 9:11 PM |
-
lukeyoyo
-
-
-
Joined on 09-21-2004
-
-
Posts 286
-
-
-
-
|
Re: pdf field is not added at the right position
Dear px3j,
Thanks for considering Aspose.Pdf.Kit!
This problem has been confirmed as the incompatibility of scanned documents with standarded PDF templates. We hope it can be solved in a week.
Best regards.
Luke Fu Product Developer Aspose Changsha Team About Us Contact Us
|
|
-
08-22-2007, 10:08 PM |
-
lukeyoyo
-
-
-
Joined on 09-21-2004
-
-
Posts 286
-
-
-
-
|
Re: pdf field is not added at the right position
Dear px3j,
After our investigation, this problem turned out to be not a bug.
We found that the document you provided employed CropBox, a special area within which everything will be ignored. If you add a field into this CropBox, it will be added normally, but you cannot see it in the page area. However, if you zoom out the document view magnification to a low percentage, such as 25%, you can find it under the bottom of the page, and that is where the CropBox resides.
Our suggestion is: adjusting the coordinates of fields to be added. As for your test document, the value of "y" (formEditor.AddField(FieldType.PushButton, id, page, x, y, x+width, y+height) ) should be largger than 432, which is just the border of the CropBox. Furthermore, AddField() function will be updated to remind user the existing of CropBox in the next release.
If you have more questions, please feel free to let me know.
Best regards.
Luke Fu Product Developer Aspose Changsha Team About Us Contact Us
|
|
-
08-30-2007, 8:34 AM |
-
px3j
-
-
-
Joined on 12-05-2005
-
-
Posts 17
-
-
-
-
|
Re: pdf field is not added at the right position
This is not true.
If I use another tool, it can add the image at the position we need. and since that tool can do it, I think aspose should be able do it too.
So please contiune work on and fixed it.
We just can not add a image to a position we shouldn't. in our case, it is a signature image. we have to insert it at the right position.
Another question, please at least return a boolean value to indicated the add field at the right position success or not, so I can do something in case of the failed.
Thanks,
Don.
|
|
-
08-30-2007, 10:52 AM |
-
lukeyoyo
-
-
-
Joined on 09-21-2004
-
-
Posts 286
-
-
-
-
|
Re: pdf field is not added at the right position
Dear Don,
Have you ever zoom out the document view magnification to a low percentage to find a newly added field under the bottom of the page? If not, please try it and tell me the result. I am also curious about what's your coordinates. Please tell me, so I can verify my judgement. And if possible, please send me the correct output generated by the tool you mentioned.
As for some other tool, I guess it may use different coordinate system. Actually we can improve the function to avoid CropBox, but we should consider the common usage habit.
Finally, to modify some function interface is a big trouble for software developing. Fortunately, the original return type is "void", so we can modify it for your requirement in next release.
Best regards.
Luke Fu Product Developer Aspose Changsha Team About Us Contact Us
|
|
-
08-31-2007, 8:46 AM |
-
px3j
-
-
-
Joined on 12-05-2005
-
-
Posts 17
-
-
-
-
|
Re: pdf field is not added at the right position
Attachment: Present (inaccessible)
Dear Luke:
I had zoom out to see the insert image, but it is not the position we want. I include a example from the other tool, that tool insert the image at the position we want. for this test purpose, I just insert three images inside.
You can see it from the attached pdf, three image will be there. So I think Aspose need to do the same.
The three coordinate are: (123,152,411,244), (120,652,408,724) and (119,225,407,297). The images at the right coordinate from that tool.
Please fixed it ASAP.
Your help is appreciated.
|
|
-
08-31-2007, 8:50 AM |
-
px3j
-
-
-
Joined on 12-05-2005
-
-
Posts 17
-
-
-
-
|
Re: pdf field is not added at the right position
Dear Luke:
As you said, please add the code to return a flag to indicate the success or not. this also important for me.
Thanks,
Don.
|
|
-
08-31-2007, 7:40 PM |
-
lukeyoyo
-
-
-
Joined on 09-21-2004
-
-
Posts 286
-
-
-
-
|
Re: pdf field is not added at the right position
Dear Don,
OK, both of your requirements will be fullfilled in about a week. I will inform you in this thread.
Best regards.
Luke Fu Product Developer Aspose Changsha Team About Us Contact Us
|
|
-
09-04-2007, 8:21 AM |
-
px3j
-
-
-
Joined on 12-05-2005
-
-
Posts 17
-
-
-
-
|
Re: pdf field is not added at the right position
Thanks,
Please let me know it once you fixed it.
Don.
|
|
Page 1 of 2 (30 items)
1
|
|