Telerik Forums
Telerik Document Processing Forum
0 answers
38 views
Hello! I'm currently attempting to transform an HTML body into a PDF using HtmlFormatProvider, RadFlowDocument, and PdfFormatProvider.

Everything functions good when generating a PDF with standard characters. However, when incorporating characters such as "ćšđž," these specific characters seem to be missing.

Could you kindly provide guidance on resolving this issue?
Sanja Tolo
Top achievements
Rank 1
Iron
Iron
 asked on 09 Feb 2024
0 answers
52 views

I created a test docx with the following text in a justified format:

"This is a brand-new document with justified text.  Putting extra text into the paragraph in order to highlight the specific justified format text.  This is simply test text in order to demonstrate the issue that I am having when I attempt to use the Telerik rad document find all."

I then upload the document into Session and save the file binary by converting the File.InputStream to Base64Stream.

I then create a find text of "This is simply test text".

The resulting IReadOnlyCollection<FindResult> of editor.FindAll(txtFind, false, true); contains one result with three runs.

"highlight the specific justified format text. This is simply"

"test"

"text in order to demonstrate the issue that I am having when I attempt to use the Telerik rad document find all.

 

I had assumed that setting match whole word would return a better result, but it does not.

I think I do not understand the concept of "runs".  There is no other formatting other than justification.  

I expected either the sentence that the text resides in to return OR the entire paragraph.  Not three incomplete sentences, one just including one word.

Patrick
Top achievements
Rank 1
 updated question on 06 Feb 2024
0 answers
48 views

Please try wps application to open docx file that generated by telerik document processing.    www.wps.cn

header and footer are not displayed .

file was generated by ASP.NET Core WordsProcessing Key Features Demo | Telerik UI for ASP.NET Core

 

 
alex
Top achievements
Rank 1
 asked on 24 Feb 2023
0 answers
454 views
We are looking to update our application from ASP.Net to Blazor.  We also use a windows application for the Microsoft.Office.Interop functionality to manipulate word Doc files and add custom properties to them.  Is there a way with the Document Processing tools to be able to recreate this process in our Blazor application?  We would like to sunset the windows application if possible.
Warren
Top achievements
Rank 1
 asked on 05 May 2022
0 answers
90 views

Hi,

I'm working on document word processing. My task is quite simple, basically I need to take a DOCX template, manipulate it by replacing some fields, with values taken from other parts, and adding some TableRow on it and, finally, I need to export it into PDF format.

This works but unfortunaley the PDF I see is not equal to the docx template from where I start, so do you know some workaround that may help me to fix this issue.

Thank you for your attention.

Luigi
Top achievements
Rank 1
Iron
 asked on 16 Mar 2022
0 answers
311 views

Hello,

I have a weird situation, that the line:

run.FontWieght = FontWieghts.Bold;

doesn't work.

in second hand, every other character attribute is working perfectly (like FontStyle, FontUnderline, Font size and so on).

can anyone guess what could be the issue? 

 

michael
Top achievements
Rank 1
 asked on 27 Oct 2021
0 answers
127 views

Hello,

i'm trying to convert some docx to PDF. The resulting document looks quite similar to the original, however i have 2 main issues:

  • Bullet lists are not present on the exported document
  • Bold text is never present in the exported document
  • The exported pdf file doesn't seem to be a valid PDF/A-3U one checking with some online validator

 

i've attached a very simple example.

Here is the code i'm using to generate the pdf:


public byte[] Convert()
{
    //to support fonts
    Telerik.Windows.Documents.Extensibility.FontsProviderBase fontsProvider = new FontsProvider();
    Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.FontsProvider = fontsProvider;

    //to support PNG's
    Telerik.Windows.Documents.Extensibility.JpegImageConverterBase jpegImageConverter = new Telerik.Documents.ImageUtils.JpegImageConverter();
    Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.JpegImageConverter = jpegImageConverter;

    var importProvider = new DocxFormatProvider();
    byte[] templateData = GetTemplateData(); 
    var template = importProvider.Import(templateData);

    var pdfProvider = new PdfFormatProvider();
    PdfExportSettings settings = new();
    settings.ComplianceLevel = PdfComplianceLevel.PdfA3U;
    pdfProvider.ExportSettings = settings;
    var pdfBytes = pdfProvider.Export(template);
    return pdfBytes;
}

//... end class

public class FontsProvider : Telerik.Windows.Documents.Extensibility.FontsProviderBase
    {
        public override byte[] GetFontData(FontProperties fontProperties)
        {
            string fontFileName = fontProperties.FontFamilyName + ".ttf";
            string fontFolder = Environment.GetFolderPath(Environment.SpecialFolder.Fonts);
            string targetPath = Path.Combine(fontFolder, fontFileName);

            DirectoryInfo directory = new DirectoryInfo(fontFolder);
            FileInfo[] fontFiles = directory.GetFiles("*.ttf");
            if (fontFiles.Any(s => s.Name.Equals(fontFileName, StringComparison.InvariantCultureIgnoreCase)))
            {
                using (FileStream fileStream = File.OpenRead(targetPath))
                {
                    using (MemoryStream memoryStream = new MemoryStream())
                    {
                        fileStream.CopyTo(memoryStream);
                        return memoryStream.ToArray();
                    }
                }
            }

            return null;
        }
    }

 

am i missing something?

Thanks in advance for your help!

Carmine
Top achievements
Rank 1
 asked on 12 Oct 2021
0 answers
80 views
Is there a way to insert row with specified index? e.g. I have table with 10 rows and I want to insert new row between row 5 and 6, is it possible?
RJ
Top achievements
Rank 1
 asked on 05 Feb 2018
0 answers
79 views

Hi All,

I have existing docx file which serves as my template. Margins, header and footer and text are all set. Text fields that will be replaced are all in { }. Just wondering how to make it multiple page single docx file with page breaks(pages are based on the number of recipients).  There will also be text replacement during process.

Right now the sample I see is creating all text and replacement from codebehind and not coming from an existing docx template ---> https://demos.telerik.com/aspnet-ajax/wordsprocessing/mailmerge/defaultvb.aspx

 

Any info that can get me started are very much appreciated.

Thanks in advance,

RJ

RJ
Top achievements
Rank 1
 asked on 15 Jan 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?