We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Bounds and Image Size Mismatch

Thread ID:

Created:

Updated:

Platform:

Replies:

147502 Sep 13,2019 04:07 AM UTC Sep 30,2019 06:07 AM UTC WinForms 14
loading
Tags: PDF
DavidBS
Asked On September 13, 2019 04:07 AM UTC

Dear Sowmiya,

I'm having problems to put an image within signature bounds. I've to set the signature.bounds.height too high to avoid to crop any image.

See the code below and the image attached:

Dim ImageSize As SizeF = New SizeF(image.PhysicalDimension)

I set the Width.Bound large enough to contain a text.
Dim TotalSize As SizeF = New SizeF(ImageSize.Width + 200.0F, ImageSize.Height)
Dim Sig_Pos As New PointF(0, 0)
signature.Bounds = New RectangleF(Sig_Pos, TotalSize)

I want to draw the image using the entire vertical area of the Bounds.
signature.Appearance.Normal.Graphics.DrawImage(image, New PointF(0F, 0F), ImageSize)

As you can see, the image is croped. To avoid this, I have to add almost 30 points to the Signature.Bounds.Height ...

Am I doing something wrong?

Thanks a lot for your help.





Attachment: 20190913_005317_3230459a.zip

Sowmiya Loganathan [Syncfusion]
Replied On September 16, 2019 10:43 AM UTC

Hi David, 

Thank you for contacting Syncfusion support.  

We have tried to reproduce the mentioned issue “Signature and image bounds mismatch” in our end with the provided code snippet. But we regret to let you know that it works fine in our end. Please find the below sample in which we have insert the image (based on image width and height) with signature appearance, 



Screenshot: 

 

Please try the above sample in your end and let us know the result. 

Regards, 
Sowmiya L 


DavidBS
Replied On September 16, 2019 02:19 PM UTC

Thanks Sowmiya, I'll try it now and return the result.

See you soon.
Bye

DavidBS
Replied On September 16, 2019 03:10 PM UTC

Dear Sowmyia,

You code functions like a charm.
I saw the PDF-Base related in you code is 17.2460.51 Pre-release and my package is 17.2460.46 (Winforms).
May the problem be related with this?

In time: I set the libraries that came with you code in my code and the results are still wrong. Interesting to notice that my code is exactly like yours (or vice-versa), but I saw a difference between images: my one is 96 DPI and yours is 72 DPI.

I will try to change my one to 72 DPI and see results.
See you soon.



DavidBS
Replied On September 17, 2019 02:27 AM UTC

Hi Sowmyia,

I ran your code with my image and PDF and everything was fine.
I ran also your code (WPF) using the libraries 17.2.0.46 and everything was fine.

But if I run my code even with your libraries (17.2.0.51) the results are still wrong.

However, I checked my code against yours and everything is similar.

So, I conclude the problem is related to some library used by PDF control v 17.2.0.46 .
I really cannot see any difference or problem related to the code itself.

Do Syncfusion has any patch/pre-release libraries (2.0.51) for Winform?

Thank you my friend.


DavidBS
Replied On September 17, 2019 02:59 AM UTC

Dear Sowmiya,

I FOUND the problem!

It's related to EnableValidationAppearance
If it is set to TRUE, the image is crop...
If it is set to FALSE, the image is normally printed.
So, I conclude this settings is using the field's bottom line... 

My question: since I'm using TimeStampServer and EnableLtv too, may I really need to set EnableValidationAppearance?
What is the real objective of this setting?

Again, I appreciate your time and efforts to help me here.

Kindest regards,
David

Sowmiya Loganathan [Syncfusion]
Replied On September 17, 2019 01:10 PM UTC

Hi David, 

It's related to EnableValidationAppearance.  
If it is set to TRUE, the image is crop... 
If it is set to FALSE, the image is normally printed. 

We were able to reproduce the mentioned issue “Image is cropped while set true to EnableValidationAppearance”. We will update further details by 19th September, 2019.  
since I'm using TimeStampServer and EnableLtv too, may I really need to set EnableValidationAppearance? 
What is the real objective of this setting? 

The main objective of this property is to add the dynamic signature validation appearance to the signature and it is not necessary to enable this property when using TimeStampServer and EnableLTV.  

Regards, 
Sowmiya L 



Sowmiya Loganathan [Syncfusion]
Replied On September 19, 2019 10:21 AM UTC

  
Hi David, 
We have confirmed that the issue with “Image is cropped in the signature appearance while set true to the EnableValidationAppearance property” is a defect and the patch for this issue will be available on 26th  September, 2019.   
Regards, 
Sowmiya L 


DavidBS
Replied On September 19, 2019 11:27 AM UTC

Thank you very much for your answers and time spent in my trouble.

I'm glad to help the the Syncfusion team to find/solve minor bugs.

Kindest regards Sowmiya.

Sowmiya Loganathan [Syncfusion]
Replied On September 20, 2019 05:35 AM UTC

Hi David, 

Thank you for the update. As promised earlier we will provide the patch on 26th September, 2019. 

Regards, 
Sowmiya L 


Sowmiya Loganathan [Syncfusion]
Replied On September 26, 2019 11:32 AM UTC

Hi David, 

The issue with “Image is cropped in the signature appearance while set true to the EnableValidationAppearance property” has been fixed and the patch for this fix can be downloaded from the following location.   

Recommended approach - exe will perform automatic configuration  
Please find the patch setup from below location:  

Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment  
Please find the patch assemblies alone from below location:  

Assembly Version: 17.2.0.46  
 
Installation Directions :   
This patch should replace the files “Syncfusion.Pdf.Base.dll” under the following folder.  
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.5.1  
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\17.2.0.46 \precompiledassemblies\17.2.0.46 \2.0 

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.  

Disclaimer :   
Please note that we have created this patch for version 17.2.0.46 specifically to resolve the following issue(s) reported in this/the Forum(s). 147502 
If you have received other patches for the same version for other products, please apply all patches in the order received.  

This fix will be included in our 2019 Volume 3 SP1 release which will be available by November 2019 tentatively. 

Regards, 
Sowmiya L 


DavidBS
Replied On September 26, 2019 12:45 PM UTC

Hi Sowmiya,

Thank you very much for that message.
I'll download it right now.

Kindest regards,
David

Sowmiya Loganathan [Syncfusion]
Replied On September 27, 2019 05:42 AM UTC

Hi David, 

Please try the fix and let us know if you need any further assistance. 

Regards, 
Sowmiya Loganathan 


DavidBS
Replied On September 27, 2019 03:57 PM UTC

Hi Sowmiya,

Sorry for hadn't responded you before.
It's perfect - the patch was applied and the results were the expected ones.

Thank you very much!

Kindest regards,
David

Sowmiya Loganathan [Syncfusion]
Replied On September 30, 2019 06:07 AM UTC

Hi David, 

Thank you for the update. We glad to know that the issue is resolved. 

Regards, 
Sowmiya L 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon