We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Part of image is truncated in a text box

This is an example of an image being truncated after conversion from Word to PDF. In this case this is an arrow indicating changed lines in a document and the right side is being truncated. Is there a way to fix this?

Hi,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for reporting this problem to us. I managed to reproduce it on my side and linked your request to the appropriate issue. You will be notified as soon as it is resolved.

As a workaround please try to set all internal margins to zero.

Best regards,

How can we do this programmatically? Can you please provide a code sample, which loops thru textboxes and setting their internal margins to 0?

Thanks

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. You can try using the following code:

// Open source document.

Document doc = new Document(@"Test001\Image+Issue+3.doc");

// Get all shapes in the document.

NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);

// Loop through all shapes.

foreach (Shape shape in shapes)

{

// Resert internal margins.

shape.TextBox.InternalMarginBottom = 0;

shape.TextBox.InternalMarginLeft = 0;

shape.TextBox.InternalMarginRight = 0;

shape.TextBox.InternalMarginTop = 0;

}

// Save to PDF.

doc.SaveToPdf(@"Test001\out.pdf");

Hope this helps.

Best regards,

Thank you for your quick reply. That fixed the issue.

The issues you have found earlier (filed as 10735) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.