Hello.
I faced several problems with the attribute "text-align: justify".
1) In the report I have a table that displays some note. This note is retrieved from the database as a string with html-markup (with all necessary tags and its different attributes). All properties of the attribute "Style" work as expected except "text-align: justify". As a result in HTML-viewer I have the note (s.attached overwritten1.png). The text somehow is overlapped/owerwritten. In PDF it looks good though (s.attached overwritten1_PDF.png). In the Sdandalone Report Designer (Preview mode) it works correctly. Unfortunately I can't reproduce the issue with demo example and CSV datasource, but when the report runs and retrieves justified note from the database the issue occurs each time.
2) Another problem is with justifying of the bold-text (s.attached bold.png): I tried to reproduce it in the example (s.attached zip-archive).
When the text has bold font-weight (using <strong>-tag) it is not justified even in Designer (Preview mode). In PDF it is also absolutely incorrect: with left-alignment text doesn't match the table size at all, with justify-alignment - text is overlapped and overwritten
3) I have the report title: bold (s.attached bold.png), text-align: center
In both in HTML-viewer and PDF the title is cut. Without bold font-weight it is wrapped correctly. But I can't remove it. I need this formatting.
Looking forward to your help in these matters.
Best regards,
Elena
I am trying to import HTML but when I try to export the radflowdocument it is blank . (i've exported to both HTML and PDF)
this is in blazor WASM.
Thanks
Phil
I'm using Telerik.Documents.Spreadsheet (2022.3.1108) .Net C# 6.0. I have my excel spreadsheet formated as I want (Excel.png). The text in the cells are clearly visible. Once the same spreadsheet is export using PdfFormatProvider. The last half a character is trimmed (not visible). (Pdf.png). While creating the excel file I do have "AutoFitWidth()" set for all the columns.
Export Code here
public void CreatePdf(Workbook wb, string fileName)
{
var fixedProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf.PdfFormatProvider();
RadFixedDocument fixedDocument = fixedProvider.ExportToFixedDocument(wb);
var pdfFormatProvider = new Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider();
pdfFormatProvider.ExportSettings.ShouldEmbedFonts = true;
using (Stream output = File.OpenWrite($"c:\\temp\\{fileName}.pdf"))
{
pdfFormatProvider.Export(fixedDocument, output);
}
}
When I convert a document from .docx to .PDF, the footer disappears. There are a couple checkboxes in the docx that disappear as well. Does this library support these things? Is there something specific I have to do to make them work?
My code:
RadFlowDocument document; Telerik.Documents.ImageUtils.ImagePropertiesResolver defaultImagePropertiesResolver = new Telerik.Documents.ImageUtils.ImagePropertiesResolver(); Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.ImagePropertiesResolver = defaultImagePropertiesResolver; using (FileStream input = new FileStream("file.bin", FileMode.Create, System.IO.FileAccess.ReadWrite)) { input.Write(doc.Content, 0, doc.Content.Count()); DocxFormatProvider provider = new DocxFormatProvider(); document = provider.Import(input); //insert the data RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document); foreach (var item in templateValues) { editor.ReplaceText(item.Key, item.Value); } //change the value in the footer editor.ReplaceText("[Document Revised Date]", doc.lastModified.ToShortDateString()); PdfFormatProvider pdfProvider = new PdfFormatProvider(); var result = pdfProvider.Export(document); return result;
Hello All,
I am using the RadSpreadStreamProcessing to export data to an Excel spreadsheet and I would like to know how to declare the column headers in the exported spreadsheet as Sortable/Filterable? Is there an example that I can be pointed to?
Thanks for any help you can provide.
W
Hi all I have a problem during the import of an existing excel file with formula inside
(e.c. IF(H1<>"";IF(J1="";"";INDEX(INDIRECT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE("Var_"&C1&"_"&G1&"_"&H1;" ";"hex20");"-";"hex2d");"(";"hex28");")";"hex29");"/";"hex2f");"+";"hex2b");"&";"hex26");".";"hex2e")&"_Daily");MATCH(J1;INDIRECT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE("Var_"&C1&"_"&G1&"_"&H1;" ";"hex20");"-";"hex2d");"(";"hex28");")";"hex29");"/";"hex2f");"+";"hex2b");"&";"hex26");".";"hex2e")&"_Levels");0)));""
or
==EOMONTH(startdate;-1)
These formula are used in different cells in different sheets and when I try to bind the generated json to a spreadsheet component I received this error:
As posted in some forum It seems due to the culture used during excel generation (I tried different approach: attached a different culture to the current thread server side, force kendo core library to use a specific culture client side, force spreadsheet to use a specific culture server side).
How can I resolved this issue?
I did not found any working solution on line.
Thank you in advanced
Eleonora
Hi Telerik.
Attempting to create a Header with your documentation. Link: Headers and Footers
The example code writes:
RadFlowDocument document = new RadFlowDocument();
document.Sections.AddSection();
document.Sections.First().Headers.Add(); // Creates the default Header.
document.Sections.First().Headers.Add(HeaderFooterType.First);
document.Sections.First().Headers.Add(HeaderFooterType.Even);
However I get the errorcode:
'object' does not contain a definition for'Headers'and no accessible extension method 'Headers' accepting a first argument of type
'object'could be found (are you missing a using directive or an assembly reference?)
Am I doing something wrong?
I'm doing a recursive file search through a lot of documents (1000000+) for a client, depending on the document type/age/size/name/path the app may read the document.
this is the read code
Dim docprovider As New Doc.DocFormatProvider()
Using input As Stream = File.OpenRead(_fname)
Dim TxtFormatProvider As New TxtFormatProvider
text = TxtFormatProvider.Export(docprovider.Import(input))
End Using
Occasionally the app will hang waiting for the
TxtFormatProvider.Export(docprovider.Import(input))
Thread to return.
I'm guessing the input stream of the .doc file is malformed in someway, and I'm not really concerned about it, but how can I get the thread to quit so the app can go to the next file?
Hello,
we are currently in need for a docx to pdf converter.
The docx file contains placeholders created in word. When we want to read it in with the Telerik documents package it gives us an error.
The Import() function returns:
Error: System.ArgumentException: 'An item with the same key has already been added. Key: 0'
Here is the code we are using:
static void ConverDocxToPdf(string path, string resultPath)
{
var docxPRovider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
var pdfProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
byte[] docBytes = File.ReadAllBytes(path);
var document = docxPRovider.Import(docBytes);
var resultBytes = pdfProvider.Export(document);
File.WriteAllBytes(resultPath, resultBytes);
}
I attached one of the templates we are using. When you try to read it in, it will return the mentioned error.
Thank you in advance!