Checkboxes turning into circles

Last post 08-10-2011, 9:01 AM by AndreyN. 15 replies.
Page 1 of 2 (16 items)   1 2 Next >
Sort Posts: Previous Next
  •  08-05-2011, 1:41 PM 320800

    Checkboxes turning into circles .NET

    Attachment: Present (inaccessible)
    Hello,
    I've got an issue when importing a Word doc into a pdf that the checkbox controls from the source doc show up as circles/bullseyes when imported into the pdf. This happens on my test server, but not on my local dev machine. I'm using an InsertDocument method I found in these forums to do the importing:

        ''' <summary>
        ''' Inserts content of the external document after the specified node.
        ''' Section breaks and section formatting of the inserted document are ignored.
        ''' </summary>
        ''' <param name="insertAfterNode">Node in the destination document after which the content
        ''' should be inserted. This node should be a block level node (paragraph or table).</param>
        ''' <param name="srcDoc">The document to insert.</param>
        Private Sub InsertDocument(ByVal insertAfterNode As Words.Node, ByVal srcDoc As Words.Document, ByVal HeaderText As String)
            Dim lic As New Aspose.Words.License
            lic.SetLicense("Aspose.Words.lic")

            ' Make sure that the node is either a pargraph or table.
            If ((Not insertAfterNode.NodeType.Equals(Words.NodeType.Paragraph))) And ((Not insertAfterNode.NodeType.Equals(Words.NodeType.Table))) Then
                Throw New ArgumentException("The destination node should be either a paragraph or table.")
            End If

            ' We will be inserting into the parent of the destination paragraph.
            Dim dstStory As Words.CompositeNode = insertAfterNode.ParentNode

            ' This object will be translating styles and lists during the import.
            Dim importer As New Words.NodeImporter(srcDoc, insertAfterNode.Document, Words.ImportFormatMode.KeepSourceFormatting)

            'add descriptive header
            Dim builder As New Words.DocumentBuilder(srcDoc)
            InsertSectionHeader(builder, HeaderText)

            ' Loop through all sections in the source document.
            For Each srcSection As Words.Section In srcDoc.Sections
                ' Loop through all block level nodes (paragraphs and tables) in the body of the section.
                For Each srcNode As Words.Node In srcSection.Body
                    ' Let's skip the node if it is a last empty paragarph in a section.
                    If srcNode.NodeType.Equals(Words.NodeType.Paragraph) Then
                        Dim para As Words.Paragraph = CType(srcNode, Words.Paragraph)
                        If para.IsEndOfSection AndAlso (Not para.HasChildNodes) Then
                            Continue For
                        End If
                    End If

                    ' This creates a clone of the node, suitable for insertion into the destination document.
                    Dim newNode As Words.Node = importer.ImportNode(srcNode, True)

                    ' Insert new node after the reference node.
                    dstStory.InsertAfter(newNode, insertAfterNode)
                    insertAfterNode = newNode
                Next srcNode
            Next srcSection
        End Sub

    Could someone let me know why this might be happening? Does MS Office have to be installed on the server like it is on my dev machine?

    I've attached two examples of the output pdf.

    Thanks in advance.
    Ben
     
  •  08-05-2011, 1:52 PM 320806 in reply to 320800

    Re: Checkboxes turning into circles

    Hi

     

    Thanks for your request. Could you please also attach your original Word document here for testing? I will check the issue and provide you more information.

     

    Best regards,


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  08-05-2011, 2:13 PM 320809 in reply to 320806

    Re: Checkboxes turning into circles

    I attached the Original.doc to the OP. Thanks!
     
  •  08-05-2011, 2:55 PM 320816 in reply to 320809

    Re: Checkboxes turning into circles

    Hi

     

    Thank you for additional information. Please make sure that Wingdings 2 font is installed on the PC where you perform conversion to PDF. If not, please try to install Wingdings2 font. This should fix the problem. Please let me know in case of any issues.

     

    Best regards,


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  08-08-2011, 7:15 AM 321019 in reply to 320816

    Re: Checkboxes turning into circles

    I just checked the server and Wingdings 1, 2 & 3 are all installed already
     
  •  08-08-2011, 8:05 AM 321039 in reply to 321019

    Re: Checkboxes turning into circles

    Attachment: Present (inaccessible)

    Hi

     

    Thank you for additional information. If you try comparing your PDF documents (Right.pdf and Wrong.pdf) you will see that the Wrong.pdf document does not contain Wingdings 2 font embedded. (Please see the attached screenshot) The only reason of this - it is Wingdings 2 is no installed on the PS where this document was generated. As a variant you can try remove/add this font for testing.

     

    Best regards, 


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  08-08-2011, 9:07 AM 321081 in reply to 321039

    Re: Checkboxes turning into circles

    Attachment: Present (inaccessible)
    Well I'm definitely confused about this. I logged into the server and tried to install Wingdings2 and got the message in the attached doc file. It's telling me it's already installed.
     
  •  08-08-2011, 9:26 AM 321085 in reply to 321081

    Re: Checkboxes turning into circles

    Hello

     

    Thank you for additional information. Which version of Wingdings 2 font you are using? My version is 1.55.

    The document produced on my side looks fine. I use the latest version of Aspose.Words 10.3.0 and the following code for testing:

     

    Document doc = new Document("C:\\Temp\\Original.doc");

     

    doc.Save("C:\\Temp\\out.pdf");

     

    Best regards, 


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  08-08-2011, 10:46 AM 321110 in reply to 321085

    Re: Checkboxes turning into circles

    I'm not sure how to get the version for the font or Aspose. Could you let me know how to get those? Thanks for all the help so far.
     
  •  08-08-2011, 11:06 AM 321112 in reply to 321110

    Re: Checkboxes turning into circles

    Attachment: Present (inaccessible)

    Hi

     

    Thanks for your request. To check version of the Aspose.Words library, right click on the dll, select Properties from the context menu, then select Version tab. You will see File version.

     

    To check version of the font just open it and you will see the version. Please see the attached screenshot.

     

    Best regards,


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  08-08-2011, 11:45 AM 321119 in reply to 321112

    Re: Checkboxes turning into circles

    Ok, the font version on my machine and the test machine are both v1.55 so there's no difference there. The Aspose.Words version is v9.7.0.0.
     
  •  08-08-2011, 1:08 PM 321133 in reply to 321119

    Re: Checkboxes turning into circles

    Hi

     

    Thanks for your inquiry. Could you please try using the latest version and let me know how it goes on your side?

    The latest version you can download here:

    http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

     

    Best regards,


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  08-09-2011, 12:34 PM 321389 in reply to 321133

    Re: Checkboxes turning into circles

    Andrey, I'm using 10.3 now and still getting the same results. Still no checkboxes.
     
  •  08-09-2011, 1:11 PM 321395 in reply to 321389

    Re: Checkboxes turning into circles

    Hi

     

    Thank you for additional information. But I still cannot reproduce the problem on my side. The document produced on my side looks fine. Have you tried converting the document which causes the problem on other machine with Wingdings 2 font installed, maybe something wrong with your server or font?

     

    Bets regards,  


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  08-10-2011, 8:52 AM 321595 in reply to 321395

    Re: Checkboxes turning into circles

    Andrey, it turns out that the web service calling my code is on a different server than the one I had been checking. Wingdings2 has now been installed on the correct server and the output PDFs now look normal. Thank you so much for your help and sorry I didn't figure out my mistake sooner!
     
Page 1 of 2 (16 items)   1 2 Next >
View as RSS news feed in XML