Sign In  Sign Up Live-Chat

No space between form field and text

Last post 07-07-2008, 3:14 PM by Hans.firefox. 20 replies.
Page 1 of 2 (21 items)   1 2 Next >
Sort Posts: Previous Next
  •  02-26-2008, 2:08 AM 114890

    No space between form field and text

    Attachment: Present (inaccessible)
    Hi,
         I'm using Aspose.Pdf version 3.6.2.0 and Aspose.Words version 5.0.2.
    I've converted the attached dot file to pdf, but the document was not converted correctly.
    For example there is COGNOME BRANDANINOME AGNESESESSO (no space between brandani and nome and no space between agnese and sesso).
    Could you please look at it?
    Thanks for help.
    Greatings
     
  •  02-26-2008, 8:44 AM 114950 in reply to 114890

    Re: No space between form field and text

    Hi,

    Can you also provide us with the code that you use to fill the fields in the template file.

    Thanks.

     
  •  02-26-2008, 9:04 AM 114955 in reply to 114950

    Re: No space between form field and text

    Hi,

    Document _doc = null;

    private string _dateFormat = "dd/MM/yyyy";

    public WordAspose(string sdoc)

    {

    try

    {

    // Settare la licenza ogni volta che si crea una nuova istanza di Aspose.Words.Document in caso contrario si usa la versione valutativa

    Aspose.Words.License licenseWord = new Aspose.Words.License();

    licenseWord.SetLicense(GetLicenseStream());

    }

    catch

    { }

    _doc = new Document(sdoc);

    }

    public override bool scrivi_segnalibro(string nome, object val, TipoSegnalibro tipo, ref string errors)

    {

    bool retVal = true;

    try

    {

    if (tipo == TipoSegnalibro.FORMFIELD)

    {

    Aspose.Words.Fields.FormField formField = _doc.Range.FormFields[nome];

    if (formField != null)

    {

    if (formField.Type == Aspose.Words.Fields.FieldType.FieldFormTextInput)

    {

    if (formField.TextInputType == Aspose.Words.Fields.TextFormFieldType.DateText || formField.TextInputType == Aspose.Words.Fields.TextFormFieldType.NumberText)

    {

    if (!(val is String && (string)val == ""))

    {

    formField.SetTextInputValue(val);

    }

    }

    else if (formField.TextInputType == Aspose.Words.Fields.TextFormFieldType.RegularText)

    {

    if (val is DateTime)

    {

    formField.SetTextInputValue(String.Format("{0:" + _dateFormat + "}", (DateTime)val));

    }

    else

    {

    formField.SetTextInputValue(val);

    }

    }

    }

    else if (formField.Type == Aspose.Words.Fields.FieldType.FieldFormCheckBox)

    {

    formField.Checked = Convert.ToBoolean(val);

    }

    else if (formField.Type == Aspose.Words.Fields.FieldType.FieldFormDropDown)

    {

    formField.DropDownItems.Clear();

    formField.DropDownItems.Add(Convert.ToString(val));

    }

    }

    }

    else if (tipo == TipoSegnalibro.BOOKMARK)

    {

    Bookmark bookmark = _doc.Range.Bookmarks[nome];

    if (bookmark != null)

    {

    if (val is DateTime)

    {

    bookmark.Text = String.Format("{0:" + _dateFormat + "}", (DateTime)val);

    }

    else

    {

    bookmark.Text = Convert.ToString(val);

    }

    }

    }

    }

    catch (Exception exc)

    {

    retVal = false;

    errors = String.Format(exc.Message + " " + exc.StackTrace + " Il campo che va in errore è {0}", nome);

    }

    return retVal;

    }

    Greatings

     
  •  02-26-2008, 9:46 AM 114964 in reply to 114955

    Re: No space between form field and text

    Hi,

    I have tested this issue and found that the xml produced by Aspose.Words doesn't have the spaces, hence the Pdf produced will also not have spaces. I am moving this thread to the Aspose.Words forum so that the Aspose.Words team can take a look at it.

    Thanks.

     
  •  02-26-2008, 12:48 PM 114993 in reply to 114964

    Re: No space between form field and text

    Attachment: Present (inaccessible)

    Hello!

     

    Thank you for addressing us. I have investigated the issue. It should be fixed in Aspose.Pdf. I can explain what happens.

     

    The characters that are present in the document but eaten in the PDF are long spaces. I created a document from scratch and inserted some test lines here. See the attachment. When I convert it to PDF everything goes fine. But in the XML of the original document there are the same characters, namely long spaces. Plain text editors like Notepad don’t show this character correctly. You can open the intermediate XML files in any binary editor. For instance I use MS Visual Studio binary editor. Here you could see that in both XML files long spaces are represented by code sequence “E2 80 83”. Just search for this sequence.

     

    What I conclude is that Aspose.Words gives equal output on the segment level but Aspose.Pdf renders long space in some conditions and doesn’t render in other. Please initiate some more investigation in Aspose.Pdf.

     

    As a workaround you can replace these long spaces with one or more non-breaking space each.

     

    Thank you,
    Viktor Sazhaev
    Software Engineer, Aspose Auckland Team
     
  •  02-27-2008, 9:37 AM 115169 in reply to 114993

    Re: No space between form field and text

    Hi,

          can you explain to your collegues of Aspose.Pdf this issue so you and they can solve the problem?

    Greatings

     
  •  02-27-2008, 10:07 AM 115173 in reply to 115169

    Re: No space between form field and text

    Hello!

     

    I wrote them about this issue and referred the thread. There's enough technical information to reproduce the problem. Aspose.Pdf staff will answer you shortly.

     

    Best regards,


    Viktor Sazhaev
    Software Engineer, Aspose Auckland Team
     
  •  02-27-2008, 10:38 AM 115183 in reply to 115173

    Re: No space between form field and text

    Thank you.
     
  •  02-27-2008, 1:43 PM 115214 in reply to 115183

    Re: No space between form field and text

    Hi,

    I have logged this as PDFNET-4504 in our issue tracking system. We will try our best to resolve this as soon as possible.

    Thanks.

     
  •  03-13-2008, 5:22 AM 117525 in reply to 115214

    Re: No space between form field and text

    Hi,   

          any news?
    Greatings
     
  •  03-14-2008, 6:37 PM 117824 in reply to 117525

    Re: No space between form field and text

    Hi,

    We are working on this issue now and we will try our best to fix it late this month. Sorry for inconvenience.

    Best regards.


    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  04-04-2008, 1:52 AM 120731 in reply to 117824

    Re: No space between form field and text

    Hi, any news?

    Greatings
     
  •  04-05-2008, 5:47 AM 120887 in reply to 120731

    Re: No space between form field and text

    Hi,

    Sorry for the delay. We have met some technichal problem on it and I am afraid we need more time to fix it. Now the priority of this issue is top. We will give you a reply here once we have made any progress. Thanks for your patience.

    Best regards.

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  04-21-2008, 3:36 AM 123195 in reply to 120887

    Re: No space between form field and text

    Hi, 

    when do you think it will be a new version with the correction?

    Greatings

     
  •  04-21-2008, 4:06 AM 123206 in reply to 123195

    Re: No space between form field and text

    Hi,

    We will try our best to send you an update in about one week. Thanks very much for your patience.

    Best regards.

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
Page 1 of 2 (21 items)   1 2 Next >
View as RSS news feed in XML