Telerik Forums
Telerik Document Processing Forum
1 answer
223 views

We are licensed user and have been trying to convert HTML into PDf using telerik. But while doing so we are loosing certain CSS styles. we are unable to wrap the text in column header and use <hr> in the pdf document. Is there any possible way to do it ?

Yoan
Telerik team
 answered on 10 Apr 2023
2 answers
112 views

I have an assembly called SharedUtllities.   It references an older version of Telerik.Documents.    I reference SharedUtllities  from JobsCore.   I also reference the lastes version of Telerik.Documents in JobsCore.   It compliles okay but, when I run it, I get a runtime error when the program hits  SharedUtllities ru = new SharedUtllities().   The error message is that it cannot find the older version of Telerik.Documents that I reference in SharedUtilities.

I cannot update the library versions used in SharedUtility  but I can recompile it.  I tried using Fody and tried using VS to include the old version in the exe but that didn’t work.    I tried to reference the old version as well as the new version got errors galore.    I also tried to use binding redirects.

So SharedUtilities references older version of Telerik.Documents.   The build does not copy any Telerik dlls.

JobsCore references SharedUtilites.dll.    Running JobsCore throws an error because it can’t find the old version of Telerik.Documents.

I can’t reference the old version and the current version.

 

 

 

Monique
Top achievements
Rank 1
Iron
 answered on 31 Mar 2023
0 answers
105 views


Dear sir

When using Korean fonts, the text length is cut off. (Style problem)

There is no problem when using other products.

Is there a solution?

 

 [telerik]

  [Good]


Jeonghoon
Top achievements
Rank 1
 asked on 27 Mar 2023
1 answer
365 views

I'm trying to programmatically create a spreadsheet from some data.  The spreadsheet I'm modelling has Excel filters at the top.  I've seen many different kinds of filters in the Kendo Document processing APIs, however it doesn't appear that any of them function like the default filter in Excel.  Is there a way to add this to my header cell and let Excel fill it in when the sheet is loaded?

Sample

Sample of what Excel shows when you click the filter button.

Mine (so far)

Dimitar
Telerik team
 answered on 23 Mar 2023
1 answer
379 views

Hello

I'm trying to implement a simple page counter in my generated document to display "Page x of y" in the footer.

I tried to use the PAGE and NUMPAGES fields, as explained in this article: https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/concepts/fields/page-field, but the NUMPAGES field doesn't update and I get "Page x of " instead.

I also tried the workaround suggested in this forum post: https://www.telerik.com/forums/table-headers-page-numbers, but the result is inconsistent - when testing on the same document I get either a count of 8 or 9, even though it's always the same document and always eight pages long.

How can I get the total number of pages in the generated document?

My current code:

RadFlowDocument document = new RadFlowDocument();
RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document);

//Business logic

PdfFormatProvider provider = new PdfFormatProvider();
RadFixedDocument fixedDocument = provider.ExportToFixedDocument(document);
int count = fixedDocument.Pages.Count;

Footer footer = document.Sections.First().Footers.Add();
editor.MoveToParagraphStart(footer.Blocks.AddParagraph());

editor.InsertText("Page ");
FieldInfo pageFI = editor.InsertField("PAGE", "1");
editor.InsertText($" of {count}");

document.UpdateFields();

using (MemoryStream output = new MemoryStream())
{
    Telerik.Windows.Documents.Extensibility.FontsProviderBase fontsProvider = new FontsProvider();     
    Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.FontsProvider = fontsProvider;
    PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
    pdfFormatProvider.Export(document, output);

    return output.ToArray();
}

Yoan
Telerik team
 answered on 20 Mar 2023
1 answer
135 views

Hello, 

I'm currently testing the Telerik PDFProcessingLibrary and I wanted to try out the example as described in your documentation https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/getting-started

I have created a simple console application in .NET 6 in VS Professional 2022 version 17.3.6. 

The code is the following:


using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf;
using Telerik.Windows.Documents.Fixed.Model;
using Telerik.Windows.Documents.Fixed.Model.Editing;

RadFixedDocument document = new RadFixedDocument();
RadFixedPage page = document.Pages.AddPage();
FixedContentEditor editor = new FixedContentEditor(page);
editor.DrawText("Hello RadPdfProcessing!");
PdfFormatProvider provider = new PdfFormatProvider();

using (Stream output = File.OpenWrite("Hello.pdf"))
{
    provider.Export(document, output);
}

If I add the references manually from the Telerik installation on my PC, I receive the following exception:

If I add them using NuGet, it's the following exception:

Do you have an idea from where it can come? Do you need further information in order to help out?

Thank you in advance and have a nice day!

Jana

Yoan
Telerik team
 answered on 16 Mar 2023
1 answer
255 views

Hello! I am having an issue with missing bold font styling when using the HtmlFormatProvider to export an HTML string to a PDF byte array. All other CSS styles work as expected in the creation of some relatively complex forms, but the bold formatting is missing from the resultant PDF document (see attached image). 

Currently using version 2020.2.615 of Telerik.Documents & related NuGet packages (upgrade may not be possible due to some legacy restrictions, so would ideally like to resolve without)

Using the following code with an example string, we save the byte array as a database record and the document is downloaded on request by the user.

// sample string
var stringToConvert = "<div><span>Here is some text. And here is some <b>bold</b> text... maybe?</span></div><div><span>Here is some text. And here is some <strong>bold</strong> text... maybe?</span></div><div><span>Here is some text. And here is some <span style=\"font-weight:bold;\">bold</span> text... maybe?</span></div>";

HtmlFormatProvider provider = new HtmlFormatProvider();
RadFlowDocument document = provider.Import(stringToConvert);

// Export document
PdfFormatProvider byteProvider = new PdfFormatProvider();
return byteProvider.Export(document);

Thank you,

Jeff

 

Yoan
Telerik team
 answered on 14 Mar 2023
1 answer
109 views

Hello All, 
I am using Telerik.Documents.SpreadsheetStreaming assembly with Version 2020.3.1019.20. I just need how to assign text having hyperlink to ICellExporter object here. Please suggest me if there is any wrong here.

string policy = "<a href=\"https://www.termsfeed.com/blog/sample-terms-and-conditions-template/\">Policy Terms</a>";
string showText = "For necessary info, Please refer " + policy;
//rowExporter -> IRowExporter object here
using var cellExporter = rowExporter.CreateCellExporter();
cellExporter.SetValue(showText);

Thanks

Sam

Dimitar
Telerik team
 answered on 10 Mar 2023
1 answer
126 views

Hello,

I have below code block to add Hyperlink(IWorksheetExporter) in cell text. But it's not working in the exported file. Please help me to resolve this. 

using var worksheetExporter = workBookExporter.CreateWorksheetExporter("Terms");
            using (var rowExporter = worksheetExporter.CreateRowExporter())
            {
                string conditions = "<a href=http://telerik.com> Terms&Conditions</a>";
                string desc = "Further info, refer " + conditions;
                using var cellExporter = rowExporter.CreateCellExporter();
                cellExporter.SetValue(desc);
            }

Thanks,

Satish 

Dimitar
Telerik team
 answered on 10 Mar 2023
1 answer
86 views

Using WordsProcessing:

  1. Is it possible to open a .DOCX file that has been encrypted (In MSWord: File > Info > Protect > Encrypt with password)?
  2. Is it possible to save a .DOCX file with encryption?

Attached .DOCX file is just an example that is encrypted with the word: password

Note this isn't the same as protection (restrict editing)

 

Dimitar
Telerik team
 answered on 08 Mar 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?