Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Fri Dec 03, 2010 12:08 pm

Hi,
Is there anyway to auto crop the image converted from RTF!?

Thanks a lot,
Bruno Oliveira

brubru
 
Posts: 3
Joined: Tue Nov 30, 2010 6:11 pm

Sat Dec 04, 2010 9:58 am

brubru wrote:Hi,
Is there anyway to auto crop the image converted from RTF!?

Thanks a lot,
Bruno Oliveira

Hi Bruno,
There is not a direct approach to do that, but you can set the margin of the page to 0 before you convert it, for example:
Code: Select all
Section section = document.GetSection();
section.PageSetup.Margins.Top = 0f;
section.PageSetup.Margins.Bottom = 0f;
section.PageSetup.Margins.Left = 0f;
section.PageSetup.Margins.Right = 0f;


Or maybe you can use CroppedBitmap to crop the result image, get more information from http://msdn.microsoft.com/en-us/library ... itmap.aspx.

Harry
Harry
Technical Support / Developer,
e-iceblue Support Team
User avatar

harry.support
 
Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm

Return to Spire.Doc

cron