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

Free Support Forum - aspose.com

Missing column when saving as pdf

Hi,

I have a word document and I want to add to the end of this document a table with 2 columns: first column will contain an auto incremented number and the second column the name of a related document. My problem is that if I save the document as word (.doc) the document looks ok, but when I save the document as pdf the second column of this table is removed.

Here is the code:



Document doc = new Document("Main.doc");
DocumentBuilder builder = new DocumentBuilder(doc);


builder.MoveToDocumentEnd();
builder.InsertBreak(BreakType.LineBreak);
builder.InsertBreak(BreakType.LineBreak);

// Set font properties for header text.
builder.Font.Name = "Arial";
builder.Font.Bold = true;
builder.Font.Size = 12;
builder.Write("Attachments");

builder.StartTable();
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Normal;
builder.Font.Size = 10;

double tableWidth = builder.CurrentSection.PageSetup.PageWidth - builder.CurrentSection.PageSetup.LeftMargin - builder.CurrentSection.PageSetup.RightMargin;
builder.RowFormat.Height = ConvertUtil.MillimeterToPoint((float)3.6);
builder.RowFormat.HeightRule = HeightRule.Exactly;
builder.CellFormat.Borders.Color = Color.Black;
builder.CellFormat.Shading.BackgroundPatternColor = Color.FromArgb(230, 230, 230);
builder.CellFormat.Borders.LineStyle = LineStyle.Single;

builder.InsertCell();
builder.CellFormat.Width = tableWidth / 3;

builder.Write("No");

builder.InsertCell();
builder.CellFormat.Width = tableWidth * 2 / 3;
builder.Write("Attached Document");

builder.EndRow();
builder.Font.Bold = false;
builder.CellFormat.Shading.BackgroundPatternColor = Color.Transparent;
int index = 1;
foreach (string item in Attachments)
{
builder.InsertCell();
builder.CellFormat.Width = tableWidth / 3;
builder.Write(string.Format("{0:N0}", index));

builder.InsertCell();
builder.CellFormat.Width = tableWidth * 2 / 3;
builder.Write(item);

builder.EndRow();
index++;
}
builder.EndTable();


doc.Save("Result.pdf");

//doc.Save("Result.doc");



I attached the base document: Main.doc and the resulting files: Result.doc and Result.pdf.

Thanks in advance for any help.

Hi

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

Thanks for your request. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

Best regards,

Hi,

Is it possible to provide a milestone for the release that will contain the fix for this issue?

Hi

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

Thanks for your request. Unfortunately, currently I cannot provide you any reliable estimate regarding this issue. Please expect a reply before next hotfix (within 4-5 weeks). We might just fix the problem or provide you more information.

Best regards,

The issues you have found earlier (filed as WORDSNET-3164) have been fixed in this .NET update and this Java update.


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

thank you