Telerik Forums
Telerik Document Processing Forum
1 answer
140 views


public static void AddLabel(TableRow quartersRow1, string Label, alignment.HorizontalAlignment LabelAlignment = alignment.HorizontalAlignment.Right,  double Labelpreferwidth = 0, int labelColSpan = 1, double LabelFontSize = 10, bool ShowBorder = false)
        {
            TableCell Labelcell = quartersRow1.Cells.AddTableCell();
            Labelcell.PreferredWidth = Labelpreferwidth;
            Labelcell.ColumnSpan = labelColSpan;
            if (ShowBorder) Labelcell.Borders = new TableCellBorders(border, border, border, border);
            Block Lblock = Labelcell.Blocks.AddBlock();
            Lblock.HorizontalAlignment = LabelAlignment;
            Lblock.TextProperties.FontSize = LabelFontSize;
            Lblock.InsertText(genericfontfamily, FontStyles.Normal, FontWeights.Bold, Label ?? "");
            
        }


We have recently migrated our application from .Net framework to .Net Core. Earlier the label we used to print in the PDF were bold, but now since we have migrated the application the bold font is showing as normal font.

The code mentioned above was giving the bold fonts for the labels in the PDF.  

Can you please let me know what changes would be needed here for the desired output.

Dimitar
Telerik team
 answered on 21 Mar 2022
1 answer
159 views

I would like to format a range of cells in an Excel Worksheet that are already part of a named range. How is it possible to format this table in the Excel worksheet with banded rows? I want it just like Excel does it for a table formatting.

Is this banding of rows possible with the present Telerik SpreadProcessing library?

Tanya
Telerik team
 answered on 17 Mar 2022
0 answers
158 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
1 answer
365 views

Hi Telerik,

I saw there is a property to exclude the hidden sheets here and here.

But, when I tried to see it in the code, I didn't find it.

I'm using version 2019.3.1021.

Is it not available on my version?

If yes, is there any workaround?

Thank you.

 

Svilen
Telerik team
 answered on 14 Mar 2022
1 answer
504 views

Hi

Is there a way to get the un rounded .Net double value of a formula cell?

Instead of using the GetResultValueAsString method used in the examples:

 

Workbook workbook = new Workbook(); 
Worksheet worksheet = workbook.Worksheets.Add(); 
worksheet.Cells[0, 0].SetValue("=SUM(A2, 3)"); 
worksheet.Cells[1, 0].SetValue(10); 
ICellValue cellValue = worksheet.Cells[0, 0].GetValue().Value; 
CellValueFormat format = worksheet.Cells[0, 0].GetFormat().Value; 
 
string valueAsString = cellValue.GetValueAsString(format); // =SUM(A2, 3) 
string resultValue = cellValue.GetResultValueAsString(format); // 13 
Dimitar
Telerik team
 answered on 03 Mar 2022
1 answer
163 views

Hi,

Which is the better way of getting the 'as displayed' cell value?


Dim selection As CellSelection = worksheet.Cells(i, j)
Dim value As ICellValue = selection.GetValue().Value
Dim format As CellValueFormat = selection.GetFormat().Value
Dim formatResult As CellValueFormatResult = format.GetFormatResult(value)
Dim result As String 

result = value.GetResultValueAsString(format)
'vs.
result =  formatResult.VisibleInfosText   

             

Thanks,

Sid

Tanya
Telerik team
 answered on 02 Mar 2022
1 answer
114 views

Hi,

I like to use the PageSetup in RadSpreadstreamProcessing. I have an generated Excel File and I would like to set Papersize and other configurations. When I integrate it in my Code the IPageSetupExporter is not known.

using (IWorkbookExporter workbookExporter = SpreadExporter.CreateWorkbookExporter(format, documentStream))
            {
                using (IWorksheetExporter worksheetExporter = workbookExporter.CreateWorksheetExporter(nameWorksheet))
                {

                 ..........

               using (IPageSetupExporter pageSetupExporter = worksheetExporter.CreatePageSetupExporter())
                        {

                        ..................

                        }

               }

           }

I get also the message that the IWorksheetExporter doesn't include a definition "CreatePageSetupExporter"?

Has anyone an example how to use this?

Regards

John

Svilen
Telerik team
 answered on 02 Mar 2022
1 answer
193 views
I am able to modify the field correctly and get them to have the correct value. When I export/save the file the form textboxes are all rotated vertically and the only fix I have been able to do is to modify the rotation of the field text in another editor. This kind of ruins the idea of code filling the pdf forms and automating the process. PDFFormatProvider / Telerik Document Processing library is 2022.1.106. I tried rotating the field after value edit to 0,90,etc...and they have all resulted in the similar issue.
johnbolt
Top achievements
Rank 2
Iron
Iron
 answered on 24 Feb 2022
3 answers
280 views

Hello,

many problemes with this code :

 PdfFormatProvider provider = new PdfFormatProvider();
            RadFixedDocument document = provider.Import(File.ReadAllBytes(InputFileWithInteractiveForms6));

 

with pdf exemple of telerik (InteractiveForms.pdf) it is ok.

with pdf issues of Excel or Word on my pc (save as .pdf) it is ok.

 

but with pdf issues of Nuance Software.

sometime, i have this error : Object reference not set to an instance of an object

sometime : Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.PdfResource' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfDictionary

 

the properties of my file are :

 

can you help me ?

thank you

eric

 


 

Eric
Top achievements
Rank 1
Iron
 answered on 23 Feb 2022
1 answer
584 views

Hi there,

What is the easiest way to change the font weight of a text? 

Thank you.

Svilen
Telerik team
 answered on 17 Feb 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?