Free Support Forum - aspose.com

Textbox rendering

Hi


We have some code that reads some stored documents from a database adds a stamped footer and then outputs a file.

I have attached the original file, and the file that is outputted, for some reason the Textbox is getting cut off and I can’t figure out why, even if I simple to a read with Aspose.Words and SaveAs to the stream this happens so I am not sure if this is a bug or something else?

The code we are using to output the file is like so:

private byte[] ConvertToBytes(AP.SaveFormat saveFormat, AP.Document asposeDoc)
{
//saves the document to a byte array without converting to PDF
var outStream = new System.IO.MemoryStream();

var saveOptions = AP.Saving.SaveOptions.CreateSaveOptions(saveFormat);
if (saveFormat == AP.SaveFormat.Pdf)
{
var pdfOptions = new AP.Saving.PdfSaveOptions();
pdfOptions.PreserveFormFields = true;
saveOptions = pdfOptions;
}

asposeDoc.Save(outStream, saveOptions);
var bytes = new Byte[outStream.Length];
bytes = outStream.ToArray();
return bytes;
}

Reading the document from the database using :
asposeDoc = new AP.Document(file.OutputStream);

And then outputting to the browser with:

context.Response.OutputStream.Write(bytes, 0, bytes.Length);

//if set explicitly to not attach or is a Visio file, (Visio 2000 has a problem with not opening inline)
var displayType = “attachment;”;
if (containsHash || System.IO.Path.GetExtension(fileName).ToLower() == “.vsd”)
displayType = “inline;”;

context.Response.AddHeader(“content-disposition”, displayType + “filename=” + HttpUtility.UrlEncode(fileName));

//set the cache from date.
if (lastModified != DateTime.MinValue && lastModified < DateTime.Now)
context.Response.Cache.SetLastModified(lastModified);

context.Response.End();

I had to cut down the code a bit as there are some database specific checks it does. If you need anymore info please let me know.

Aspose.Words We are using 11.8.0 for .Net 4.

Thanks

Sean
Hi Sean,

Thanks for your inquiry. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-7053 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

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


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

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan