Free Support Forum -

Apose.Cells PDF Problem


we want to send XLS documents via FAX with the Hylafax software on linux.

Since hylafax can not convert xls(x) to faxformat, we want to transform them with Aspose.Cells into a PDF file before.

I made several example-Files and converted them with the following simple code:

string folder = String.Empty;

Workbook workbook1 = new Workbook();
workbook1.Open(folder + "Excel2003.xls");
workbook1.Save(folder + "Excel2003.pdf", FileFormatType.Pdf);

Workbook workbook2 = new Workbook();
workbook2.Open(folder + "Excel2007.xlsx");
workbook2.Save(folder + "Excel2007.pdf", FileFormatType.Pdf);

Workbook workbook3 = new Workbook();
workbook3.Open(folder + "Excel2003_simple.xls");
workbook3.Save(folder + "Excel2003_simple.pdf", FileFormatType.Pdf);

Workbook workbook4 = new Workbook();
workbook4.Open(folder + "Excel2007_simple.xlsx");
workbook4.Save(folder + "Excel2007_simple.pdf", FileFormatType.Pdf);

Workbook workbook5 = new Workbook();
workbook5.Open(folder + "Excel2007_font.xlsx");
workbook5.Save(folder + "Excel2007_font.pdf", FileFormatType.Pdf);

The original Excel files as well as the converted PDF Documents are attached to this message.

The first 4 generated PDFs cannot be converted to fax Format.
The program "pdf2fax" from hylafax exits with the following error message:

bin/pdf2fax: line 185: 16667 Speicherzugriffsfehler $PS -q -sDEVICE=$device -dNOPAUSE -dSAFER=true -sPAPERSIZE=$paper $FIXEDWIDTH -dBATCH -r$hres\x$vres "-sOutputFile=$out" $fil

Ueberpruefen Sie jedes PostScript Dokument auf nicht standard konforme Fonts und invalide Konstruktionen

(in English it would be like:

bin/pdf2fax: line 185: 16667 Segmentationfault $PS -q -sDEVICE=$device -dNOPAUSE -dSAFER=true -sPAPERSIZE=$paper $FIXEDWIDTH -dBATCH -r$hres\x$vres "-sOutputFile=$out" $fil

Please check every postscript document for non-standard fonts and invalid constructors

With the current version of ghostscript on Debian.

Tried this command with ghostscript-8.70 with this result:
gs -dNOPAUSE -dQUIET -dBATCH -sPAPERSIZE=a4 -sDEVICE=cfax -sOutputFile=test.sff Excel2007.pdf

Error: /rangecheck in --run--
Operand stack:
--dict:5/14(L)-- --dict:20/21(ro)(L)-- 37 37 37
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1846 1 3 %oparray_pop 1845 1 3 %oparray_pop 1829 1 3 %oparray_pop --nostringval-- --nostringval-- 3 1 2 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- %finish_show --nostringval-- --nostringval-- 10 11 1 --nostringval-- (gs_show_enum) %op_show_continue
Dictionary stack:
--dict:1154/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:285/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:21/40(L)-- --dict:1/1(ro)(G)-- --dict:9/15(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.70: Unrecoverable error, exit code 1

Aspose.Word generated PDF Files in a very simple form work!
For 2003 as well as for 2007.

I downloaded the DLLs yesterday.

The pdf, if directly exported out of office 2007, works.

There is a second problem with the last excel-file.

Excel2007_font.xlsx throws an exception:

"Die Schriftart Aharoni unterstützt den Schnitt Regular nicht."
(in English it should be something like: "Font 'Aharoni' does not support style 'Regular'")

bei xf1e06fd8be9d8c69.xd285aa8659b8b74e.x0acd3c2012ea2ee8(String xafe2f3653ee64ebc)
bei Aspose.Cells.Workbook.Save(String fileName, FileFormatType fileFormatType)
bei AsposePDF.Program.Main(String[] args) in C:\Users\Mario\SVN\test\AsposePDF\Program.cs:Zeile 42.
bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()

Is there anything you can do about the pdf and the font problem so we could use the Aspose Components?



Please try the attached version. I have tested and it fixes the font problem regarding “Excel2007_font.xlsx” as it works fine with the file.

Moreover, we will look into the issue regarding pdf conversion regarding fax format. We will get back to you soon.

Thank you.

Thank you for your quick response. I’ll try it as soon as possible.