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

Free Support Forum - aspose.com

Saving as SWF width issue

Hello,


I am having some difficulties to get the proper page width when saving document as SWF format.

Whenever I set the ParagraphFormat.LineSpacing to smaller than 12, saving to SWF generates extremely wide SWF file even though saving as Doc and Pdf works fine.

Document doc = new Document();
var builder = new DocumentBuilder(doc);
builder.InsertParagraph();
builder.ParagraphFormat.LineSpacing = 10;
builder.Writeln(“Test Test”);
doc.Save(“C:/help.swf”, new SwfSaveOptions() { SaveFormat = SaveFormat.Swf, ViewerIncluded = false });

This issue also occurs when I use the following code:

NodeCollection paragraphs = doc.GetChildNodes(NodeType.Paragraph, true);
foreach (Paragraph paragraph in paragraphs)
{
if (paragraph.ParagraphFormat.SpaceAfter > 10)
{
paragraph.ParagraphFormat.SpaceAfterAuto = false;
paragraph.ParagraphFormat.SpaceAfter = 0;
}
}

Please help.

This width issue also occurs when inserting html.


Document doc = new Document();
var builder = new DocumentBuilder(doc);
builder.InsertHtml(“
  • Organized annual shareholder meetings, including site selection, catering and preparation of appropriate materials.
”);
doc.Save(“C:/help.swf”, new SwfSaveOptions() { SaveFormat = SaveFormat.Swf, ViewerIncluded = false });


Hi

Thanks for your request. As I can see the problem does not appear if use our own viewer. It seems FlaxPaper (I suppose you are using it to view the document) for some reason does not read bounds of page properly. That is why page width calculated by FlaxPaper is incorrect.

You should note that in MS Word documents, content can go outside the page. We are using clipping layer on frame to cut this content out. So size of the page should be correct anyway.

May I ask you why you do not use our viewer, but use FlaxPaper instead?

Best regards,

Hi Alexey,


Thank you for looking into this issue. I actually tried the embedded Aspose swf viewer first but there were a couple of issues.

1. When the “wide frame” issue happens, Aspose swf viewer by default zoom out to the maximum when it loads (Long Sentence.gif vs. Short Sentence.gif when frame width is correct).

Question: is there a way to pass in parameters to control the default behavior of the Aspose swf viewer)?

2. Embedding Aspose swf viewer increases generated pdf file size from 20K to 600K. This will be a big problem if user need to browser through many Swf files because embedded Swf view cannot be cached in client side and needs to be downloaded everything.

3. Aspose swf viewer has a quite noticeable logo in the top right corner. I prefer not showing component branding in my product.

Most of my generated Swf files have proper frame width, which make me think the extremely “wide frame” that sometime occurs is something unintended.

Sincere there isn’t anything on those extra wide spaces, is there a way to set the frame? Or is there any other workaround for this issue?

Thanks,

Hi

Thank you for additional information.

1. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. We will let you know once it is resolved.

By default viewer should “fit to page width”, but for some reason it does not do this. We will investigate the problem and provide you more information.

2. We will consider reducing size of viewer UI.

3. As I can see Flax Paper also contains a logo but in bottom right corner. Could please share your idea where we should put our logo in viewer? Current version of the viewer is the 1.0 version and we are still working on it. So your feedback are appreciated.

Best regards,

Thank you for the information. Now I am trying a workaround by saving generated document into EMF images, inserting EMF files into a new document, and then save new document as SWF file. This seems to fix the frame width issue.

One other question though: How can I remove/disable the 1-pixel black page border that gets automatically added to the saved SWF file?

Ps. FlexPaper only adds logo in its GPL Licensed version. Commercial License does not show FlexPaper branding. Since I already have paid license of Aspose Word, I do expect Aspose swf viewer not showing its logo (or at lease make logo optional).

Thanks,

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

Thank you for additional information.

1. We will consider removing the logo. Will a small about button be acceptable for you? Or how would you like we add information about producer into the SWF document?

2. No, there is no way to disable border. Do you think we should completely remove this border or provide an option to control it?

As always your feedback is greatly appreciated. Thank you for helping us to improve our product.

Best regards,

Hi Alexey,


1. A small about button (grey scale, 20x20 pixels) would be much desirable if removing Aspose branding from the Swf player isn’t an option.

2. The border should be removed or at least made optional in generating Swf file.

Thanks,

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

Thank you for your suggestions. Your feedback will really help us to improve our product.

Thanks for cooperation.

Best regards,

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

We discussed the issue with logo and decided the following:

1. In the next version we will not change the logo. We just finished work on new skin of viewer and just do not have time to change it before release.

2. After the next version, we will probably remove the logo and provide an ability to insert your own logo in the viewer. I suppose this will be great option for you.

Best regards,

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


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

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


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

A fix for the issue(s) you've reported (filed as 22233) will be released in the next release at the end of this month.


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

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


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