Quantcast
Channel: Aspose.Words Product Family
Viewing all 1762 articles
Browse latest View live

Image add

$
0
0
Hi,
     i want to add image in document at specific location. How can i define location and image size to add ?

Thanks

Words converted to slides wraps some text

$
0
0
Some text blocks that are not wrapped in words get wrapped in slides when it's converted. Is there a way to prevent that?

Document based on a template loses normal style after saving with Aspose

$
0
0
Hi,

In order to reproduce follow these steps:

* Create a new template (T.dotx) and change the font of the normal (and any other style)
* Create a new document (Doc.docx) from this template and add some text using these new styles

Now run the following code;

            var doc = new Document(@"Doc.docx");
            doc.Save(@"Out.docx");

If you open Out.docx everything is fine.
But if you first rename or delete the original template (T.dotx) and then open Out.docx the file is missing all the style changed.
The original document (Doc.docx) still keeps the original style changes despite the template no longer being there because the latest styles were saved with the document by Word; this is the expected behaviour.

The issue does not exist if the code above is run after renaming/deleting the template.

Cheers,

Export Wordpress page to Docx

$
0
0
Hi,

I added the Aspose Doc Exporter to a simple wordpress installation and gave it a try.
I have simple content pages with uploaded images.
A test to export some pages to a doc file does export only the text, but not the images.
Is this because of the free cloud account?
Or is there any other issues?

I also used the Aspose Doc Importer and had only some minor formatting issues.

But more important would be the question about the exporting the pictures.

Getting "out of memory exception" while saving word document as a PDF file

$
0
0
Hi , 

We just need to save a large word document having size of 50 MB or above. While saving the document using the below lines of code, we are getting the Out Of Memory exception: 

Document document = new Document(filePath); document.Save(HttpContext.Current.Server.MapPath(saveAsFileName), Aspose.Words.SaveFormat.Pdf);

Following is my machine configuration: 
Installed RAM: 8 GB 
Processor: Intelcore I5, 240 Gig Hz 

We thought that we may split the file into various sub files and then save them as PDF individually and thereafter will merge all pdf files into one unit. But we found that doc.Sections.Count returns 1 and hence we were not able to proceed with this approach. Can you kindly look into the issue and do let me know the solution for the same.

It is pretty urgent!! 

Thanks,
Howdy

Word: Excessive revisions number for minor change in table

$
0
0
Hi!

I created Word document containing one table (f1.docx). Then I splitted one of the cells and saved modified document as  f2.docx. Latest Aspose.Words for .NET 16.11.0 library shows me 15 revisions (8 insertions and 7 deletions) between these docs, whereas Word v.2010 compare shows 2 revisions (1 insertion and 1 format change).

Would you please take a look and try to remove extra revisions. Or suggest a workaround at least.

Thanks & regards,
Max

Conversion Word to PDF : value in Word fields are not the same

$
0
0
When converting a Word document to PDF the value in Word "fields" are not the same in the PDF (see samples attached: values highlighted in yellow are different between Word and PDF)

Code to convert is:

new Document(wordInputStream).save(pdfOutputStream, SaveFormat.PDF)

Version used is AsposeWords 16.7.0 (java)

LayoutCollector returning wrong/missing information for Word tables

$
0
0
I have attached an example solution that takes a Word file with a "simple" table within it and uses LayoutCollector/LayourEnumerator, combined with DocumentLayoutHelper from the examples, to display the coordinates of the cells within this document. I'm using the latest Word DLL (not included in the attachment).

The code simple reads in the Word file, and dumps out the render information for that table. The output is as follows:

    Render Row 00,      Page 01, at (188.85,216.766) size (379.85,469.252)
       Row 00, Cell 01, Page 01, at (188.85,216.766) size (211.5,469.252)
       Row 00, Cell 01, Page 01, at (400.35,216.766) size (168.35,469.252)
    Render Row 01,      Page 02, at (188.85,72) size (379.85,645.034)
       Row 00, Cell 00, Page 02, at (188.85,72) size (211.5,645.034)
       Row 00, Cell 01, is empty
    Render Row 02,      Page 03, at (188.85,72) size (379.85,352.064)
       Row 00, Cell 00, Page 03, at (188.85,72) size (211.5,352.064)
       Row 00, Cell 01, is empty
    Render Row 03,      Page 03, at (188.85,424.064) size (379.85,117.688)
       Row 01, Cell 00, Page 03, at (188.85,424.064) size (211.5,1073742)
       Row 01, Cell 01, Page 03, at (400.35,424.064) size (168.35,117.688)
    Render Row 04,      Page 03, at (188.85,541.752) size (379.85,176.782)
       Row 02, Cell 00, Page 03, at (188.85,541.752) size (211.5,176.782)
       Row 02, Cell 01, Page 03, at (400.35,541.752) size (168.35,176.782)
    Render Row 05,      Page 04, at (188.85,189.688) size (379.85,293.97)
       Row 03, Cell 00, Page 04, at (188.85,189.688) size (379.85,293.97)

Now, there are at least 3 problems with this output:
    1) The first highlighted cell number is wrong, it should be 00
    2) The second highlighted cell's height is totally wrong!
    3) There should be another render row in between Render Row 04 and Render Row 05 and it's totally missing. I *think* it's getting enumerated, but it's being orphaned from it's parent table/row, which is why it's not showing up in the above output.

Can you confirm that these are defects and when they might be addressed as this is holding up a production release!

Thanks,
Andy.


HTML to Word, CSS media print commands

$
0
0
Hi,

Is it possible to make Aspose.Words recognise @media print CSS commands?

We have HTML that can be displayed on screen, which needs to act differently when viewed via a browser or printed.  In particular we have the following HTML to signify a page break, which shows "----Page Break---" on screen, but actually implements a page break when printed...

<div class="pageBreakScreen">----Page Break----</div><div class="pageBreakPrint">&#160;</div>

The following CSS is used to achieve the screen vs print...

@media screen {
  .pageBreakPrint {
    display:none;
  }
}

@media print {
  .pageBreakScreen {
    display:none;
  }
  .pageBreakPrint {
    width:100%;
    page-break-after:always;
  }
}

This thread says that this is not possible with your Aspose.PDF component, so I'm going to assume that Aspose.Words will not be able to handle @media queries either.  Please can you confirm that is the case?

If it is not possible to convert the document using @media print queries, can you please tell me how I can convert any instance of the above HTML so that a new page is created?

(Oh, and BTW, your Tag selection system on this forum is simply awful!)

Many thanks,
Tom

Hanword Document

$
0
0
Hi aspose team,
Does Aspose Words support converting HWP  to
  • PDF
  • TXT
  • HTML
  • PNG
  • JPG
  • TIF
  • BMP
Thanks

the problem if extract embedded ole object

$
0
0
Hello,
Now i want to extract that zip file in a word file
but extract  the file is  like a archive format
The 7z extract the file below:
   Contents
   [1]Ole
   [3]ObjInfo
   [3]PRINT

The  Contents is original file.
 How to get the Contents file in aspose?
Maybe somebody says GetOleEntry has the function,but how to use?

my code :


            string FilePath = @"F:\";
            string File = FilePath + "111.docx";

            Document doc = new Document(File);

            // Save document as DOC in memory
            MemoryStream stream = new MemoryStream();
            doc.Save(stream, SaveFormat.Doc);

            // Reload document as DOC to extract images.
            Document doc2 = new Document(stream);
            NodeCollection shapes = doc2.GetChildNodes(NodeType.Shape, true);
            int imageIndex = 0;
            foreach (Shape shape in shapes)
            {
                if (shape.OleFormat !=  null)
                {
                    //string imageFileName = string.Format(
 
                    shape.OleFormat.Save(string.Format(@"F:\out_{0}.zip", imageIndex));
   

                }
            }
        }


Thank you

java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

$
0
0
When I run my code in Linux,it cause this problem:
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:191) java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81) java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1182) asposewobfuscated.zzL0.(Unknown Source) asposewobfuscated.zzL0.(Unknown Source) com.aspose.words.zzZ1J.zzZqz(Unknown Source) com.aspose.words.zzZ1J.zzZ(Unknown Source) com.aspose.words.zzZNH.zzZ(Unknown Source) com.aspose.words.Document.zzZ(Unknown Source) com.aspose.words.Document.zzZ(Unknown Source) com.aspose.words.Document.zzZ(Unknown Source) com.aspose.words.Document.save(Unknown Source) com.landray.kmss.converter.aspose.AsposeOfficeToHTMLConverter.wordToHTML(AsposeOfficeToHTMLConverter.java:136) com.landray.kmss.converter.aspose.AsposeOfficeToHTMLConverter.officeToHTML(AsposeOfficeToHTMLConverter.java:38) com.landray.kmss.converter.aspose.AsposeOfficeToHTMLConverter.execute(AsposeOfficeToHTMLConverter.java:32) com.landray.kmss.converter.impl.ConverterWorker.run(ConverterWorker.java:23) java.lang.Thread.run(Thread.java:745)

Last word font changed after mail merge.

$
0
0
Trialing Aspose Word 16.7, doing a very simple mail merge.

On original word document, the font for Normal style is Arial size 10. 

I insert one mail merge field on the document, change the size to 8.

After mail merge, the last word in the merge field becomes size 10, all the previous word are size 8.

Why the last word in the merged filed become size 10??

Templates and merged files are attached.

This is a very simple example and I believe it can be solved easily. 

PDF rendition have _x000d_ instead of line breaks in the header

$
0
0
Hi,
PFA - source document and generated PDF using Aspose and office and a screenshot to make it more clear.


Code:
Document doc = new Document(path);
PdfSaveOptions saveOptions = new PdfSaveOptions();
doc.save(path + "1.pdf", saveOptions);

Issue: As you can see in the PDF generated using Aspose, instead of line breaks, it is showing "_x000d_".

Note: PDF is rendered fine using office.

Please check with the issue asap as it is urgent to the customer.
Thanks.

Regards,
Ankur Vashsihtha

Conversion to PDF very slow on linux

$
0
0
Hi,
when converting a Word document to PDF the conversion is very slow on linux : same conversion takes 4s on windows and 66s on linux red hat

Code to convert is:

new Document(wordInputStream).save(pdfOutputStream, SaveFormat.PDF)

Version used is AsposeWords 16.11.0 (java)


Compare Multiple Word Documents

$
0
0
Hi,

I am testing Apsose Word compare functionality based on sample project "DocumentComparison.sln". 

I was wondering if  there is a way to compare more than two documents with each other? 
Do I need to create my own class to achive this or there is already something out there?

Thanks,
David

Some code from project:

"DocumentComparisonUtil."
"docCompUtil.Compare(comparisonDocument1, comparisonDocument2, comparisonDocument, ref added, ref deleted);"

Insert html font family problem ?

$
0
0
Hi

We are inserting HTML into a word document.

On certain font the result font on the word document was incorrect (default font was used)

An example of inserted HTML is attached. (zip file)

Also the problematic font is attached (code 128.zip)

When the HTML contains ' chars around the name (IE font-family:'code 128') it works just fine.
When HTML contains no ' chars (IE font-family:code 128) the output is with the default document font.

This behavior does not apply to "courier new" font so i assume there is some bug.

Tested on version 16.8 and 16.10.

Thanks in advance.



Re: Doc to HTML - Clean Up Unnecessary Spans

$
0
0
I am using the current trial of Aspose.Words for .NET.

Merging of spans with the same formatting doesn't work.

The 2010 Q3 release note says it was fixed, but it is broken now. For example, saving a docx as html I get the following:

<span style="font-family:'Times New Roman'; text-decoration:underline">&#xa0;</span><span style="font-family:'Times New Roman'; text-decoration:underline">&#xa0;</span><span style="font-family:'Times New Roman'; text-decoration:underline">&#xa0;</span><span style="font-family:'Times New Roman'; text-decoration:underline">&#xa0;</span>

Evaluation Only.Created with Aspose. Words. Copyright 2003-2016 Aspose Pty Ltd.

$
0
0
Dear Sir/Madam,

I have Developer OEM licence for Aspose word and when I an trying to generate word document through ASPOSE I am getting below line at the top of the generated word document.

Evaluation Only.Created with Aspose. Words. Copyright 2003-2016 Aspose Pty Ltd.

And also the word document is truncated as per below message.

The Document was truncated here because it was created in the Evaluation Version.

Please let me know as I am using licence version then why I am getting this error .

Awaiting for your response.

TypeInitializationException

$
0
0
Hi,
On our prod environment we got TypeInitializationException sometimes on some documents we try to export to msword (on the same documents sometimes we got it and sometimes we don't).

since you forums system does not support special chars i've uploaded the callstack as an image.

Please advise how we can solve this.

Thanks.
Viewing all 1762 articles
Browse latest View live