Auto crop RTF to Image

Technical support for Spire.Doc

Moderator: iceblue support

Auto crop RTF to Image

Postby brubru » 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

Re: Auto crop RTF to Image

Postby harry.support » 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

Who is online

Users browsing this forum: No registered users and 0 guests