Telerik Forums
Telerik Document Processing Forum
1 answer
67 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
110 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
60 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
67 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
44 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
1 answer
106 views
It should have the following features using latest version of the documentation:
1)The ability to set margins should be available.
2)The ability to export PDF files should be available.
3)I'd like to incorporate html content in various blocks, as well as one logo and signature.
Yoan
Telerik team
 answered on 07 Mar 2023
1 answer
56 views
Dimitar
Telerik team
 answered on 06 Mar 2023
0 answers
74 views

Dear Telerik Team,

We encounter an issue with export html data to pdf file using below code. For example,

using Telerik.Web.UI;

using OpenXmlSpreadsheet = DocumentFormat.OpenXml.Spreadsheet;
using Pdf = Telerik.Windows.Documents.Flow.FormatProviders.Pdf;
using te = Telerik.Windows.Documents.Flow.FormatProviders.Html;
using tm = Telerik.Windows.Documents.Flow.Model;
using tp = Telerik.Windows.Documents.Primitives;
using tt = Telerik.Windows.Documents.Spreadsheet.Theming;te.HtmlFormatProvider provider = new te.HtmlFormatProvider();

tm.RadFlowDocument document = provider.Import(HttpUtility.HtmlDecode(htmldata));
tt.ThemeFontScheme fs = new tt.ThemeFontScheme("Arial", "Helvetica", "sans-serif");
tt.DocumentTheme theme = new tt.DocumentTheme("PDF", document.Theme.ColorScheme, fs);
document.Theme = theme;
document.Sections[0].PageMargins = new tp.Padding(50, 25, 50, 25);
Pdf.PdfFormatProvider providerPdf = new Pdf.PdfFormatProvider();
byte[] fileBytes = providerPdf.Export(document);

 

"providerPdf.Export(document);" this line throws exception "An exception occurred during a WebClient request" whenever we include <img src="/image path/image.png" /> html tag.

Your support is appreciated.

 

 

Pravin
Top achievements
Rank 1
 asked on 03 Mar 2023
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
1 answer
116 views

I am trying to use Telerik document processing to append some text to an existing pdf document. The text is in Arabic language, that is,  it is Unicode and it has  right to left direction. The resulted pdf document does not show the text even though I can it render the text if I changed the text to  English.

Does Telerik pdf document processing library support Arabic text?

Yoan
Telerik team
 answered on 15 Feb 2023
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?