Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

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