Sign In  Sign Up Live-Chat

Problem while coverting word to PDF

Last post 11-11-2008, 2:19 AM by forever. 24 replies.
Page 1 of 2 (25 items)   1 2 Next >
Sort Posts: Previous Next
  •  09-23-2008, 6:04 AM 145125

    Problem while coverting word to PDF

    Attachment: Present (inaccessible)

    Hi,

    We are using Aspose.PDF.dll version 3.6.2.9. In our application we are converting word to PDF in our prodution. The problem we are facing is:

       The footer in the word document (please find attached word.doc)  is coming properly (we want the footer at the bottom of the page). When the word file is converted to PDF (using Aspose) the footer is not coming properly, it is either coming partially or coming at the top of the next page (please find attached PDF1.pdf).

       We converted the same word file to PDF using some other tool. In this case the footer is coming properly (please find PDF2.pdf).

    Please help. The problem is occuring on prodution so please provide solution asap.

    Thanks

     

     
  •  09-23-2008, 7:42 AM 145135 in reply to 145125

    Re: Problem while coverting word to PDF

    Hello Samanvay,

    I have tested the issue and I’m able to reproduce the same problem. I have logged it in our issue tracking system as PDFNET-6029. We will investigate this issue in detail and will keep you updated on the status of a correction. We apologize for your inconvenience.


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  09-27-2008, 6:59 PM 145814 in reply to 145135

    Re: Problem while coverting word to PDF

    Attachment: Present (inaccessible)
    Hi Samanvay,

    As we render the pdf according to the intermediate xml generated by Aspose.Words so, we need aspose words team's cooperation to resolve the problem. I had reported it to aspose words team. We have come to the conclusion that it is quite difficult and it's better to modify the document to avoid the problem. I have attached our latest dll and the modified doc. Please try this workaround. And let us waiting for aspose words team's further advice on it.
    Thanks.

    Best regards.


    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  09-28-2008, 3:31 AM 145827 in reply to 145814

    Re: Problem while coverting word to PDF

    Hello Samanvay!

     

    I’m Viktor, the developer on Aspose.Words Team responsible for integration with Aspose.Pdf. Our colleagues asked me to take a look on your case.

     

    Floating boxes from page 3 are anchored to an empty paragraph (ID=paraId_2 in the intermediate XML). To make things visible I added "111" to that paragraph (you can do the same for experiment). If you convert it you can see that in MS Word the anchor paragraph is placed at the top of page 3, but in PDF it is at the bottom of page 2. Why does this happen? My next experiment is removing floating contents anchored to that paragraph. In this case MS Word places the paragraph on page 2. I think it calculates the space needed for floating objects and if they don't fit then they are moved to the next page among with anchor paragraph. There are no other attributes in document model that might help us distinguish the case. It is quite difficult to decide and I think it's better to consider document refactoring. I would split contents into pages explicitly and anchor the floating objects to pages, not paragraphs. This would give more predictable conversion to PDF. Please try putting a page break after the columns end and anchor the floating contents to page. Let me know if this workaround is suitable for you.

     

    Regards,
    Viktor Sazhaev
    Software Engineer, Aspose Auckland Team
     
  •  09-29-2008, 7:59 PM 145991 in reply to 145827

    Re: Problem while coverting word to PDF

    Hi Viktor,


    Thanks for your reply.


    I see following issues with the suggestion


    1) Word file is being generated dynamically using XSL (Aspose is not used) and I can’t split contains on pages explicitly. I don’t know which page will be the last page


    2) I want footer to be always bottom aligned

     

    Can you please try again with other approach as other PDF convertors are working fine and giving format

    same as word

     

    I appreciate your help on this


    Thanks

    Saman

     
  •  09-30-2008, 2:03 AM 146006 in reply to 145991

    Re: Problem while coverting word to PDF

    Hello!

     

    Thank you for your clarification.

     

    As I know XSL is a text transform technology. But you are attaching a binary doc file. Maybe you are generating WordprocessingML or OOXML file first. Okay, if you are using XSLT (XSL Transform) we can change its rules to achieve better results in PDF. You don’t need to split every page in the document and even know how many pages you have. If you treat those floating objects as footer then it’s better to place them in the real footer of the last section. This is logically correct. So the workaround turns out to be the following:

     

    1. Add a section break after all “main” contents and before what you call footer.

    2. Add a real MS Word footer for this section and move floating content there. Anchor it to page both vertically and horizontally.

     

     

    I know that “other PDF convertors” might give correct results even on the original document. But this case could be difficult to fix and needs cooperation with Aspose.Pdf Team. At least we cannot improve this quickly. Sorry for inconvenience. If you attach your XSLT and explain all the procedure we would try to help you more.

     

    Regards,
    Viktor Sazhaev
    Software Engineer, Aspose Auckland Team
     
  •  09-30-2008, 3:38 PM 146139 in reply to 146006

    Re: Problem while coverting word to PDF

    Thanks  for your quick reply on this. You are right, we are rendering WordML to generate doc file

    I still see an issue with the your suggestion and I hope i have understood you correctly

    The "footer" which we are showing is "document footer", not page footer. And if I add my footer contents into Word footer it will repeat on every page. Word does not provide way to have footer only on last page and that is the reason I am using it as floating text + bottom aligned

    It will be difficult for me to give you real XSL file for some restriction. I'll try to create a pseudo XSL for you

    Thanks
    Saman
     
  •  09-30-2008, 6:46 PM 146161 in reply to 146139

    Re: Problem while coverting word to PDF

    Hi again!

     

    Please note that headers and footers are assigned to every section in MS Word. If you add a section break before the last page you can do what I advise.

     

    You can construct a minimal sample from your XSLT. This would be easier for us to understand it and to help you. Of course it should reflect the real structure of your documents.

     

    Regards,
    Viktor Sazhaev
    Software Engineer, Aspose Auckland Team
     
  •  10-01-2008, 4:40 PM 146295 in reply to 146161

    Re: Problem while coverting word to PDF

    Attachment: Present (inaccessible)

    PFA File.

    SSB_1.xsl is main file and Footer.xsl is support file

     

    Thanks

    Saman

     
  •  10-03-2008, 5:17 AM 146494 in reply to 146295

    Re: Problem while coverting word to PDF

    Hello!

     

    Thank you for these materials. That’s difficult to understand why you split the XSLT in two documents and how you combine them. You should know better as you developed this transform. But you can see that group shapes are represented by <v:group> tags. To see how they should be properly anchored you can create a minimal sample in WordprocessingML format and inspect it. As I wrote two things should be changed: section break before the page with footer and footer contents absolutely anchored to page.

     

    Regards,
    Viktor Sazhaev
    Software Engineer, Aspose Auckland Team
     
  •  10-08-2008, 4:49 PM 147203 in reply to 146494

    Re: Problem while coverting word to PDF

    Attachment: Present (inaccessible)

    Hi There,

    I tried to create word doc with section break and footer but it does not work. Footer for the last section is not appearing all the time.

    here is my observations about attached doc.

    • Footer is appearing nicely, its only when section-3 (last section with footer) is consuming full page
    • Footer will disappear if there are two sections on the same page, please add or remove text from section-1 to see this behavioure.

    Plese let me know if there is anything worng in this.

    Thanks
    Saman

     
  •  10-08-2008, 7:13 PM 147216 in reply to 147203

    Re: Problem while coverting word to PDF

    Hello!

     

    Last section that has the considered footer should always start from a new page. Please see how different section breaks can be inserted. You need section break, from new page. Second thing that needs experimenting is footer type. I see that you added a primary footer. You can also try first page footer to achieve this.

     

    Regards,
    Viktor Sazhaev
    Software Engineer, Aspose Auckland Team
     
  •  10-08-2008, 7:35 PM 147217 in reply to 147216

    Re: Problem while coverting word to PDF

    Thanks for quick reply.

    I know, that a section can be started from new page BUT we dont want to have footer on new page as long as last page has sufficient space.

    I dont see this problem can be solved using word footer. Can you please again look into your API and see if word file which I have attached in first post translated correctly into PDF

    This issue has become highest priority for us and  I appreciate your help on this

    Thanks

    Saman  

     

     
  •  10-09-2008, 2:05 AM 147243 in reply to 147217

    Re: Problem while coverting word to PDF

    Hello!

     

    Thank you for valuable clarification. Now I tried ungrouping shapes in the footer (or what we call footer) and conversion result got as expected. Please try this and let me know if the workaround helps.

     

    Regards,
    Viktor Sazhaev
    Software Engineer, Aspose Auckland Team
     
  •  10-09-2008, 12:59 PM 147338 in reply to 147243

    Re: Problem while coverting word to PDF

    Attachment: Present (inaccessible)

    Hi,

    Could you send me the file which you have modified.

    When i ungroup the footer, its overlapping the text.

    Attached is screenshot

    -Saman

      

     
Page 1 of 2 (25 items)   1 2 Next >
View as RSS news feed in XML