Calling new Document() . Print(string)

Hi, our company have been using your product for a few years, and in nearly every case, we have been able to get around any issues we’ve encounted, until this one at least.

When we use the following code

Document doc = new Document("\\S-218090-100222100034-CL21P-1.docx");
doc.Print("\\HP LaserJet Reception 4000 B&W");

we find that any content controls that contain a “\r\n” displays incorrectly when printing and when saving as pdf (passing in PDF printer rather than the actaul printer)

When printing direct to the printer, the address record will look like this in the original document just as it should. (Viewed in Word 2007)

123 ABC Street

Adelaide SA 5000

but printing via code it prints like this

123 ABC Street

SA 5000

and in PDF will convert to

123 ABC Street

SA 5000

Adelaide

When printed from Word 2007, the address displayes as it’s shown in the document.

Any suggestions would be great as this is a major issue for our customers that we at this stage, haven’t been able to resolve.

Hi

Thanks for your inquiry. Could you please attach your input document here for testing? I will check the problem on my side and provide you more information.

Best regards,

Hi, thanks for looking into it.

Document is attached.

Hi

Thank you for additional information. I cannot reproduce the problem on my side using the latest version of Aspose.Words. I use the following code for testing:

Document doc = new Document(@"Test001\S-218090-100222100034-CL21P-1.docx");
PrinterSettings settings = new PrinterSettings();
settings.PrinterName = "Microsoft Office Document Image Writer";
settings.PrintToFile = true;
settings.PrintFileName = @"Test001\out.tif";
doc.Print(settings);

I sent tif document produced on my side to your e-mail.

Best regards,

Hi, thanks for the e-mail.

I’ve used your code to attempt to reproduce your results, of course mine is slightly different but essentially the same

Document doc = new Document(@"\\HSL-QA\HAMBSYSTEMS\Production\Templates\2010\1002\S-218090-100222100034-CL21P-1.docx");
PrinterSettings settings = new PrinterSettings();
settings.PrinterName = "Microsoft Office Document Image Writer"; //@"\\pancho\HP LaserJet Reception 4000 B&W";
settings.PrintToFile = true;
settings.PrintFileName = @"D:\out.tif";
doc.Print(settings);

I’m using Aspose.Words v8.1.0.0

With a runtime Version of v2.0.50727

Dev Env VS 2008 with .NET 3.5 SP1

Am I using the latest version, I’m pretty sure it is as I downloaded the trial a few days ago.

At this stage, I just simply can’t see what the issue could be.

This message was posted using Email2Forum by AndreyN.

Hi

Thank you for additional information. But I still cannot reproduce the problem on my side. Could you please convert your document to PDF using Aspose.Words and attach here?

Best regards,

Hi,

We’ve done more internal investigation, and found that if the document is opened in word and then saved, then printed in this manner, then it will print fine.

In this scenario however, we are using Aspose.Words to generate the doc file and then to also print the file, so at no time has this document been opened by word.

I’m unsure if you opened and saved the file or just saved the file directly, are you able to check this difference?

We’re certain that this is the difference between your testing and ours.

Regards

Nolan

It looks as though I may have attached a document that I had opened in word, which may account for why you didn’t get the issue. I’m attaching the same document again, that has not been opened in word at all so you’ll need to use the newly attached document for your testing.

Regards

Nolan

Hi Nolan,

Thank you for additional information. I managed to reproduce the problem with printing. Could you please provide me the code which you use for generating this document? I will check the issue and provide you more information.

Best regards,

Hi Andrey,

I haven’t heard back after I sent you the code (sent it directly to your e-mail). Just thought I’d check to see if any progress has been made as to our issue?

Regards

Nolan

Hi

Thanks for your patience, and sorry for delayed answer. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

Best regards,

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


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