Render problems with PDF and Print

We are currently running an evaluation of Aspose Word and have been working with RTF documents for creating PDFs and printing. I am seeing two problems.

1. When Printing or Saving to PDF documents that were created on the fly and have all thier internal dates set to March 3, 2012 for some unknown reason Date field in the document is rendered to October 11, 2010. For the PDF I am using Document.save with a type of PDF.

2. Printing is missing the barcode font and appears to be about 25% too big to fit on the page causing data to get truncated on the printed page. I have tried printing to the default printer, to the printer name, and with properties set and I get the same results each way. I am using the Document.print method.

I have included a zip file with the original RTF document Test.rtf, the PDF created using Document.save with a type of PDF called Test.pdf and a Scan.jpg of the printed document using Document.print(properties).

Hi there,


Thanks for your inquiry.

1) Aspose.Words is actually correct in this case, if you open your RTF document you will see the RTF keywords:

{\field{*\fldinst {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \insrsid1181844\charrsid2326441 DATE \@ “MMMM d, yyyy” }}{\fldrslt {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid15207431 October 11, 2010}}}

So Aspose.Words is reading the correct field result from the input document. You might find the result is different when you open in MS Word as it might automatically update such fields to the current date. However the changes won’t be preserved unless you save the document.

Also, you can update the field to the current time/date in Aspose.Words by calling doc.UpdateFields.

2) Could you please attach the “bars12.ttf” font here for testing?

Thanks,

Thanks, I will give the doc.UpdateFields a try.

Here is the bar font.

Hi there,


Thanks for your inquiry.

I’m afraid I couldn’t reproduce the issue on my side. Could you please attach a screenshot on your side as the barcode appears in Microsoft Word and in the output PDF generated by Aspose.Words?

Thanks,

That was in my first zip file named Scan.jpg. I printed the document and then scanned it in to show exactly how it was printing. I am attaching the jpg file again to this message. I have tried printing to an HP PhotoSmart 2710 and an IBM InfoPrint 32 with the same results.

The barcode prints right under the word USA and is the 6th printed line in the document (not counting the image in the header).

It would be helpful if you could show me the code you used to print it. I freely admit that we could be doing it wrong, we are working with an evaluation copy and I have only been working on it for a week or so and the only training I have had is what I could get from the samples and figure out from the JavaDoc. I have tried using doc.print() as default, with the printer name, and with the printer properties and got the same results each time. We are printing in the background from a JEE application on the server so using the dialog box in AsposeWordsPrintDocument is not an option.

Oh, we did use the doc.updateFields to get the date/time stamps to update to curent when creating the PDF or printing so that is working.

We found a post indicating that Aspose.Words 10.5 for java would print correctly and that solved the scaling problem where it seems to print too big for the page, but the barcode font is still not rendering in either the 11.1 or the 10.5 version of Aspose.Words for java.

I have done some digging and found out I was on 10.8 and not 11.1 like I thought. I ogirinally downloaded the all in one version and it was packaged with 10.8. I downloaed 11.1 and re-tested, the barcode font shows up but the scalling is off and what it is trying to render is too big for the page. It looks like the JPG I sent earlier but with the barcode working.

So far with the Aspose.Words for Java 10.5 prints the correct scaling of the document but does not print the barcode. Version 10.8 prints the incorrect scaling and does not print the bar code. Version 11.1 prints the incorrect scaling and prints the bar code correctly.

All I need is to get the correct scaling from 10.5 working with the correct barcode from 11.1 and I am golden.

Hi there,


Thanks for this additional information.

It’s great the barcode font is now appearing in the rendered output. Regarding your last issue with scale, I’m afraid I couldn’t spot any different between the output produced and the input document.

Could you please clarify this further with another screen shot. Furthermore, it would be helpful if you could attach the “correct” scaling output generated by 10.5 here as an image as well.

Thanks,

Here are the two documents, one printed with Aspose.Words for Java 10.5 and the other with 11.1. I wrote 10.5 at the top of one and 11.1 at the top of the other. In the scan11.1.jpg you can see that the text is larger and gets cropped at the right and bottom margin. It is noticably larger then the 10.5 image.

I don’t know if it will make a difference but we are using the JDK 1.6 version of Aspose.Words.

Hi there,


Thanks for your inquiry.

I see what you mean now, my apologises as I missed it before because I was too focused on the barcode :).

This is a known issue and was a bug introduced in Aspose.Words for Java 10.6. I have linked your request to the appropriate issue. We will inform you as soon as this issue is resolved.

If you require a work around for the current version, you may want to look into the CustomPrint code sample under the Examples project. You can find this in the Aspose.Words for Java sample pack. This sample shows how to control printing by implementing custom printing using Aspose.Words. You may be able to locate and work around the current problem using this for the time being.

Thanks,

The issues you have found earlier (filed as WORDSJAVA-450) have been fixed in this .NET update and this Java update.


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