Printing control-document to RightFax-Server not working

Hallo,

we want to use Aspose.words to send faxes via the RightFax Enterprsie FaxServer. To send faxes with Rightfax, wie print a control-document to a Windows Network Printer.

The Controldocument has the following structure:

<NOCOVER>

<TONAME: John Dow>

<TOFAXNUM: 03061072299>

<BILLINFO1: 0746620142>

<ADDDOC: \server\Temp_FaxSend\25fax.pdf>

RightFax analyses the control-document, to find the fax-number of the recipient and the PDF-Files from the network to send.

Our problem is, that aspose.words seams to print the document as graphics to the PCL-driver for the FaxPrinter, and so the text and the keyword are lost. The result is, that RIghtFax is not able to process the document.

So: Is there any way to solve this issue, so the texts and keyword are embeded als text and not as graphics into the PCL-data send to our printer?

Sven

@tgjas

Thanks for your inquiry. Please try the latest version of Aspose.Words for .NET 18.11. Hope this helps you.

If you still face problem, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output PDF that shows the undesired behavior.
  • Please attach the expected output PDF file that shows the desired behavior.
  • Please share the code that you are using to convert document to PDF.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

In the attached zip-file you finde the word-document generated by aspose, and the PCL file send to the printer when printing the document from Aspose and from Word.

This is the C# code used for generating and printing the controldocument:

Aspose.Words.Document doc = new Aspose.Words.Document();
Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
Aspose.Words.Font font = builder.Font;
font.Size = 10;
font.Name = "Arial";
Aspose.Words.ParagraphFormat paragraphFormat = builder.ParagraphFormat;
paragraphFormat.LineSpacing = 13.8;
Aspose.Words.PageSetup ps = builder.PageSetup;
ps.PaperSize = Aspose.Words.PaperSize.A4;
paragraphFormat.SpaceAfter = 10;
//                builder.Writeln("<DELETEFIRSTPAGE>");
builder.Writeln(@"<NOCOVER>");
builder.Writeln(@"<TONAME:" + Ansprechpartner + ">");
builder.Writeln(@"<TOFAXNUM:" + FaxNr.Replace(" ", "").Replace("/", "").Replace("+49", "0049") + ">");
SqlParameter mySQLParameter = new SqlParameter("@lfdNr", SqlDbType.Int);
mySQLParameter.Value = laufendeNr;
builder.Writeln(@"<BILLINFO1:" + OmbudatDB.Database.SqlQuery<string>("SELECT dbo.fkt_lfdNrMitPruefziffer_alternativ (@AktZ,@lfdNr)",
                                        new SqlParameter("@AktZ", (Regex.Replace(Aktenzeichen, "[A-Z]", "")).Replace("-", "")),
                                        new SqlParameter("@lfdNr", laufendeNr)).FirstOrDefault()
                                + ">");
//                builder.Writeln(@"<PREVIEW>");
//                builder.Writeln(@"<ADDDOC:\\omb-bln.local\ombudat$\WebBeschwerdeConverter\Temp_FaxSend\25fax.pdf>");
builder.Writeln(@"<ADDDOC:" + OmbudatDB.Database.SqlQuery<string>("SELECT dbo.fkt_ServerPfad (@Pfad)", new SqlParameter("@Pfad", PfadPDFsFuerFaxServer + "\\" + FaxVersandID.ToString() + "fax.pdf")).FirstOrDefault() + ">");
doc.Save(PfadPDFsFuerFaxServer + "\\" + FaxVersandID.ToString() + "fax.doc");

FaxVersand myFaxVersand = OmbudatDB.FaxVersand.Where(dings => dings.FaxVersandID == FaxVersandID).FirstOrDefault();
myFaxVersand.PfadDeckblatt = PfadPDFsFuerFaxServer + "\\" + FaxVersandID.ToString() + "fax.doc";
myFaxVersand.PfadPDFFaxServer = PfadPDFsFuerFaxServer + "\\" + FaxVersandID.ToString() + "fax.pdf";
OmbudatDB.SaveChanges();
if ((FaxDrucker ?? "") != "")
{
    PrinterSettings printerSettings = new PrinterSettings();
    printerSettings.PrinterName = FaxDrucker;
    doc.Print(printerSettings, PfadPDFsFuerFaxServer + "\\" + FaxVersandID.ToString() + "fax.doc");
}

aspose_word_rightfax_problem.zip (7.9 KB)

Any help is warmly welcome.

Sven

@tgjas

Thanks for sharing the detail. Please spare us some time for the investigation of this issue. We will get back to you soon.

@tgjas

We have logged a new ticket as WORDSNET-17805 in our issue tracking system for your requirement. We will check the possibility of implementation of this feature. We will inform you via this forum thread once there is an update available on it. We apologize for your inconvenience.

@tgjas

Thanks for your patience. The Document output by the Print() method causes the document to be converted into graphics. Unfortunately, we cannot do anything about it. However, it is possible to convert the original document into the PCL format. This can be done by using the Document.Save() method with the appropriate attributes. This method converts the source document into PCL file, which contain escaped sequences that contain data about the document text. But we are not sure whether Rightfax can correctly recognize it. This document will differ from document that you sent generated by the Word, but will be built on the basis of the PCL specification. We hope this approach will help to solve your problem.