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

Free Support Forum - aspose.com

Spaces, lines orientations and size of text is not correct when document is printed using C#

Hi ,

I’m using Aspose.words to convert a docx document into pdf . when I compare the original documents and the converted documents (after printed ) . I could see some difference .
  • The spaces and the lines orientations and the size of the texts are not the same .
  • Also , there is a shift of lines which are making some of the data moving to the next line.
  • ·<span style=“font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: “Times New Roman”;”>
    <span style=“font-size:12.0pt;font-family:“Times New Roman”,serif;
    background:yellow;mso-highlight:yellow”>These documents have to be printed as
    is in the .docx as these are state regulatory <o:p></o:p>

I’m attaching the original docx and converted pdf please help me out .

<span style=“font-size: 12pt; font-family: “Times New Roman”, serif; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255);”>Are there any option to set the margins
in pdf ?<span style=“font-size:12.0pt;font-family:“Times New Roman”,serif”>
If yes , what changes I
have to make to set the same margin as .docx?
. I’m also appending my java code with this.
<o:p></o:p>

Also I’m using a temporary licenced version of Aspose .pdf. (OS:Windows)



Hi there,


Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for Java 17.6 and have not found the shared issue in output PDF.

It seems that you are printing the PDF using Adobe reader. We suggest you please print the document using Document.print method. If you want to print the document using Adobe reader, we suggest you please use the same paper size in printer setting that your Word document have.

If you still face problem, please share some more detail about your query along with steps to reproduce your issue at our end. We will investigate the issue and provide you more information on this.

Thanks for the reply . I used the new jar and now its working fine .But , I need to set the page set up to Actual size(Using Adobe Pdf Reader) every time I print the document . Is There any way I can do that from code,Such that the document gets printed in its actual size.

@naveenallu,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. You can not change the PDF viewer’s default settings of printer using Aspose.Words. This setting is related to Adobe PDF Reader. If you convert your document to PDF using MS Word and print it using Adobe PDF Reader, you will get the same output.

We suggest you please print the document using Document.Print method. Hope this helps you.

Best Regards,
Tahir Manzoor

Hi ,
We used the updated JAR (17.6) , but still we have few issues with the pdf conversion Testing.zip (115.3 KB)

      1. word wrapping up to next line 
      2. content in the footer cutting off

We think these two issues are related to the margin settings in the pdf conversion , is there anyway we can force /set the margins in ASPOSE or use the same margins as word?

I’m enclosing the sample document along with the converted pdf using Aspose . Kindly have a look over this

Thanks ,
Naveen

@naveenallu,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for Java 17.6 and have not found the shared issue. We have attached the output PDF with this post for your kind reference. 17.6.zip (85.6 KB)

Please note that in evaluation mode there are some limitations applied. E.g. Aspose.Words injects an evaluation watermark at the top of the document. The document’s contents are truncated after a certain number of paragraphs during import or export. You are facing this issue due to evaluation watermark.

Please request for 30-days temporary license from here:
Get temporary license

Please read following article about applying license.
Applying a License

Best Regards,
Tahir Manzoor

Hi,

  • We were unable to download the files shared by you .
  • Though we use a temporary licence , We are facing the same issue mentioned above .(Now we get the pdf without water mark).

Note:
We are using the Aspose.words version 17.6.

Kindly do the needful .

Thanks,
Naveen

@naveenallu,

Please download 17.6.zip file from the following link and see if you can still observe the mentioned issues in it?

Best regards,

Hi ,

Though we use the temporary licence , we are still having an issue with the text wrapping to the next line . I’ve enclosed the sample documents (both docx and pdf generated ) . Kindly test with these documents and let us know know if there is any option to set the margin exactly same as that of the docx document .

Thanks,
Naveen
Page_Shift.zip (38.9 KB)

@naveenallu,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 17.7, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-15631. Your thread has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Please note that I’m using Aspose.words for java.

@naveenallu,

Thanks for your inquiry. The latest version of Aspose.Words for Java is completely auto-ported from .NET, i.e. we do not write code for Aspose.Words for Java; it is generated out automatically from C# code of Aspose.Words for .NET. In your case, the issue which was logged with WORDSNET prefix, would be auto resolved for Java variant of Aspose.Words. Your problem (WORDSNET-15631) will be fixed as soon as the linked issue is resolved.

Best regards,
Awais Hafeez

A post was split to a new topic: Conversion Issue with Aspose.Words

A post was split to a new topic: Text wrapping problem during Word to PDF conversion