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

Free Support Forum - aspose.com

Table- header and columns width distorted after conversion from doc- docx and xls to pdf

When converting a document (docx, doc) and the documents are using
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><span style=“font-size:11.0pt;font-family:“Calibri”,“sans-serif”;
mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:
“Times New Roman”;mso-ansi-language:EN-US;mso-fareast-language:EN-US;
mso-bidi-language:AR-SA”>most of the width of the A4 paper its very common that
the converter divides the file on 2+ rows. Source doc attached and result pdf attached. Notice that if we try to increase width of header to the right side for several pixels the problem disappears. Similar problem also exists with xls files but there converter divides the file into two pages. After changing the column width the problem disappears. Examples attached. Is there any possibility to influence on such behavior using Save options or something else? Thanks in advance.

<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>

Hi Mikhail,

Thanks for your inquiry.
uaprogrammer:
When converting a document (docx, doc) and the documents are using most of the width of the A4 paper its very common that the converter divides the file on 2+ rows. Source doc attached and result pdf attached. Notice that if we try to increase width of header to the right side for several pixels the problem disappears.
I would like to address your issue from Aspose.Words perspective.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-9882. 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.
uaprogrammer:
Similar problem also exists with xls files but there converter divides the file into two pages. After changing the column width the problem disappears. Examples attached. Is there any possibility to influence on such behavior using Save options or something else? Thanks in advance.
I am moving this forum thread to Aspose.Total forum. My colleagues from Aspose.Cells team will reply you shortly about Excel to Pdf conversion issue.

Thanks a lot for your help, Tahir. Looking forward for any results.

Best regards,
Mikhail

Hi Mikhail,

Thanks for using Aspose APIs.

I would like to address your inquiry with Aspose.Cells perspective.

I was able to observe this issue after converting your source xlsx file into pdf. The output pdf does not match with the Excel Print Preview and Excel generated pdf. It contains undesired lines in the page 2 and 3.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-42495.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\source_2.xlsx”;


Workbook workbook = new Workbook(filePath);

workbook.Save(filePath + “.out.pdf”);

Hi,


I would also like to address your issue from Aspose.Cells perspective for converting Excel file (XLS) to PDF.


FYI, Aspose.Cells renders PDF file based on what is shown in print preview of the sheets when viewing in MS Excel manually. The PDF produced by Aspose.Cells is ok as far as rendered number of pages are concerned (although there is a formatting issue which Shakeel Faiz already logged a ticket “CELLSNET-42495” into our database), you may confirm this on your end by taking the print preview of the Excel sheet which does show 3 pages too. You may also convert the Excel file to PDF using MS Excel manually.

By the way, if you need to render one page per Excel sheet in the output PDF file, please see the document for your reference:
http://www.aspose.com/docs/display/cellsnet/Render+One+Pdf+Page+Per+Excel+Worksheet±+Excel+to+Pdf+Conversion

Let us know if you have any other issue, we will be happy to assist you soon.

Thank you.

Shakeel, thank you for your help. I am looking forward for any results.

Best regards,
Mikhail

									Amjad, thank you too. This code example helped me with possibility to see sheet per page in result pdf.<br><br>Best regards,<br>Mikhail<br>

Hi,

Thanks for using Aspose.Cells.

Please download and try this fix: Aspose.Cells
for .NET v8.0.1.1
for your issue CELLSNET-42495 and let us know your feedback.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi, Shakeel,

Thank you and Aspose team for help. The problem has been resolved with this new version of library.

Still wait for your help with Aspose.Words problem.
Thanks in advance

Best regards,
Mikhail

Hi,


Thanks for your feedback.

Good to know that your issue regarding PDF rendering for Excel file(s) is resolved by the new fix/version.

For your other issue regarding Aspose.Words, my fellow colleagues (from Aspose.Words) will update you soon here.

Thank you.

Hi Mikhail,

Regarding Words, this was a complex issue and was divided in two parts. Analysis of the issue has been completed and one part of the issue also has been fixed but it will be fixed completely once the second part is also fixed. At the moment, no ETA is available and it is planned for a later release. We will update you as soon as it is fixed.

Best Regards,