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

Free Support Forum - aspose.com

RTF (Outlook-RTF-Mail) to PDF -> OLE-Imagetext converts to black image

Hello,



I need to convert a RTF-mail message to PDF. Therefore I save the mail as a RTF file (in an Outtlook-AddIn) and want to convert this RTF file into a PDF using the Aspose-API.



As you will see in the attached PDF file, the OLE-Symbol of a PDF file is rendered perfectly but the text of the file is rendered as a black image.


The other problem is that the embedded picture (the last picture, a .jpg) is cropped.


[.Net 3.5]

Hi there,


Thanks for your inquiry.
bea.grosse-venhaus:
As you will see in the attached PDF file, the OLE-Symbol of a PDF file is rendered perfectly but the text of the file is rendered as a black image.
We have tested the scenario using latest version of Aspose.Words for .NET 15.12.0 and have not found the shared issue. Please use Aspose.Words for .NET 15.12.0. We have attached the output Pdf with this post for your kind reference.
bea.grosse-venhaus:
The other problem is that the embedded picture (the last picture, a .jpg) is cropped.
Please note that Aspose.Words mimics the same behavior as MS Word does. If you convert your document to Pdf using MS Word, you will get the same output. In your case we suggest you please increase the page size or change the orientation of page to landscape.

We have tested the scenario using following code example.

Document doc = new Document(MyDir + “EMail_2016-78.rtf”);<o:p></o:p>

PdfSaveOptions options = new PdfSaveOptions();

options.Compliance = Aspose.Words.Saving.PdfCompliance.PdfA1a;

doc.LastSection.PageSetup.Orientation = Orientation.Landscape;

Table table = (Table)doc.GetChild(NodeType.Table, 0, true);

table.PreferredWidth = PreferredWidth.FromPercent(100);

doc.UpdateTableLayout();

doc.Save(MyDir + "Out.pdf", options);

Thanks for your answer.

Your code assumes that I know which tables overlap the page height or width.

How canI determine which tables/images/charts should be resized and to which size?

In my example RTF file a table contains a picture that is too large (width). How can I determine which elements in a document schould be resized and to which size (e.g. how could I determine the size of the table cell of the image)?

Hi there,

Thanks for your inquiry. The image is imported into Shape node and MS Word's table is imported into Table node. You can use Shape.Width and Shape.Height properties to get/set the image's width/height. Please use PageSetup.PageWidth property to get the page's width. Regarding getting table and cell width, please read following documentation link.
Specifying Table and Cell Widths