Using Aspose.Words 6.2.0.0 and the attached Word document, I run the following code.
Aspose.Words.Document doc = new Aspose.Words.Document(“asposeWordTest04.doc”);
doc.Save(“c:\temp\asposeWords04.pdf”, Aspose.Words.SaveFormat.Pdf);
Two problems arise :
1- The Top and Bottom Layout (Text wrapping settings) of the TextBox is
ignored and the first column of text appears moved up on the page,
resulting in some text overlap (see attached pdf)
2- The word document is 131 KB, the resulting PDF is 650 KB. Why is that ? The original image is a JPG of 92 KB.
One last question :
3- Is there any difference between the two following lines of code?
I noticed that Save() also works fine with HttpResponse but SaveToPdf needs a intermediate MemoryStream to work. (The resulting file size seems to also be bigger…)
Text wrapping around images or tables is not supported in Aspose.Words rendering at the moment. Hopefully this will be supported later in 2009. Issue #7180.
On my latest code the resulting PDF is only 56.1KB. We’ve made a fix that the images that are originally JPEG saved to PDF as JPEG. In your version it is converted to PNG hence the big size. Will be released later in March.
There is no difference between Document.Save(“myfile.pdf”) and Document.SaveToPdf(“myfile.pdf”); Document.SaveToPdf is just a newer family of methods that can accept parameters specific to PDF export (e.g. PdfOptions). I get the same file size in both methods, in fact one just calls another.
Sorry no preview. It will take longer for us to prepare, build and go back and forth than to just release some time next week.
You cannot use any Document.Save to write to response.OutputStream directly because http output stream does not support random access (positioning). http output stream is only sequential write stream.
The Document.Save method that accepts an HttpResponse was explicitly designed to help with that. Internally, it saves into a memory stream first and then copies to http output.
Might I suggest then throwing an exception that’s a little more precise than the default “Not supported exception”. It would help us fix our code when encountering this situation…
I posted notification here because this thread was linked to the issue. Most likely, we reproduced this problem with your document. Sorry for inconvenience.
Best regards.
1. Text wrapping around images or tables is not supported in
Aspose.Words rendering at the moment. Hopefully this will be supported
later in 2009. Issue #7180.
Using version 7.0.0.0, I notice that it is still not supported.
Thanks for your request. Unfortunately, currently, the issue still unresolved, and I cannot provide you any reliable estimate regarding this feature. Text wrapping is very complex feature. Most likely, this feature will be supported somewhere in the first half of the next year.
Best regards,
We are happy to tell you that a very cool and important feature (filed as 7180) is included in the new version of Aspose.Words. Text wrapping around images and shapes when rendering Microsoft Word documents to PDF, XPS and printing is now supported. You can download the latest version from here.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.