Telerik Forums
Telerik Document Processing Forum
8 answers
615 views
How can I add QR-code to the Word file in a specific place?
Андрей
Top achievements
Rank 1
 answered on 29 Jul 2019
1 answer
190 views
Can I convert a lot of wmf files to 1 pdf file using Telerik tools?  Thanks.
Georgi
Telerik team
 answered on 19 Jul 2019
1 answer
421 views

I'm trying to write a simple script to merge two files together. 

The files that are created show as corrupt. Is there something im doing wrong?

Sub Main()
      Dim file1 As Byte() = ReadFile("e:\test1\test1.pdf")
      Dim result As New IO.MemoryStream
      Dim fileWriter As New PdfStreamWriter(Result, True)
 
      Dim pdfSource As New PdfFileSource(New IO.MemoryStream(file1))
      For Each pg As PdfPageSource In pdfSource.Pages
          fileWriter.WritePage(pg)
      Next
 
      Dim b As Byte()
      b = Result.ToArray()
      Dim writer As IO.FileStream = IO.File.OpenWrite("e:\test1\abc12222.pdf")
      writer.Write(b, 0, b.Length)
      writer.Close()
 
  End Sub
  Function ReadFile(filename As String) As Byte()
      Dim io As New IO.FileInfo(filename)
      Dim fs As IO.FileStream = io.OpenRead
      Dim b() As Byte
      ReDim b(io.Length)
      fs.Read(b, 0, io.Length)
      fs.Close()
      Return b
  End Function
Peshito
Telerik team
 answered on 04 Jul 2019
1 answer
201 views

hi sir,

 

              I compress the main level with five level of sub folder using telerik it compress in to one single folder.But i want same like as before compress(i want to follow same folder structure while extract).

the below image show as original

http://prntscr.com/o7djqa

this one i need

http://prntscr.com/o7dkmt

but it show 

http://prntscr.com/o7dkmt

i send the project it has two button button one work i use oridanry zip format but button2 not work properly i use telerik

https://www.dropbox.com/s/i5pwsbbthkab5jy/WebSitesss.rar?dl=0

 

Tanya
Telerik team
 answered on 02 Jul 2019
4 answers
833 views

Hello,

I have a RadFlowDocument that I am exporting to PDF via the standard flow PDFFormatProvider. If the document has some text that used the Arial Narrow font that is either bold, italicized or both the PDF output is always showing just plain Arial Narrow. This seems to be the only font that is having this problem.

Has anyone else encountered this or have any suggestions on how to fix it?

Thanks,

-Tom

Georgi
Telerik team
 answered on 19 Jun 2019
3 answers
479 views
Is it possible while creating a document with WordsProcessing to create a table of content just like I can do that using Microsoft Word Interop?
Peshito
Telerik team
 answered on 17 Jun 2019
3 answers
294 views
Trying to create pdf to print address labels on existing 3 column Avery 8460 form. I am using Telerik.Windows.Documents.Fixed.Model.RadFixedDocument and RadFixedDocumentEditor with Telerik.Windows.Documents.Fixed.Model.Editing.Tables.Table but can't get everything to line up. I'm thinking using Block with position and size would be better. Can anyone point me in the right direction? ASP.NET C# Any examples out there? Thanks Fred
Tanya
Telerik team
 answered on 13 Jun 2019
1 answer
1.0K+ views

Hi all, 

I'm using RadPdfProcessing for ASP.NET MVC to create pdf template for financial documents. Sometimes content of some tables can be various length. In this case I'd like to move lower blocks/tables to a new page and generate pdf document with two pages. I'm using RadFixedDocument and FixedContentEditor to create tables/blocks on the document.  Piece of ode below:

  public static RadFixedDocument CreateDocument()
{
      RadFixedDocument document = new RadFixedDocument();
      RadFixedPage page = new RadFixedPage();          
       page.Size = new Size(600, 750);           
             
      FixedContentEditor editor = new FixedContentEditor(page);
      document.Pages.Add(page);
 
      editor.Position.Translate(defaultLeftIndent + 330, defaultTopIndent);
            DrawTable(editor, maxWidth);
 
            editor.Position.Translate(defaultLeftIndent, defaultTopIndent + 70);
            DrawTitle(editor, maxWidth);
 
            editor.Position.Translate(defaultLeftIndent, defaultTopIndent + 110);
            DrawTableWithDetails(editor, maxWidth);
            
            editor.Position.Translate(defaultLeftIndent, defaultTopIndent + 220);
            DrawReceiverTable(editor, maxWidth);
         
             private static void DrawTable(FixedContentEditor editor, double maxWidth)
        {
            Table table = new Table();
            table.LayoutType = TableLayoutType.AutoFit;
            table.DefaultCellProperties.Padding = new Thickness(1);
 
            #region FIRST ROW
            TableRow firstRow = table.Rows.AddTableRow();
            TableCell firstCell = firstRow.Cells.AddTableCell();
            Block firstBlock = firstCell.Blocks.AddBlock();
            firstBlock.TextProperties.FontSize = 10;
            firstBlock.TextProperties.Font = FontsRepository.Helvetica;
            firstBlock.InsertText("xxxxxxxxx");
 
            TableCell secondCell = firstRow.Cells.AddTableCell();
            Block secondBlock = secondCell.Blocks.AddBlock();
            secondBlock.TextProperties.FontSize = 10;
            secondBlock.TextProperties.Font = FontsRepository.Helvetica;
            secondBlock.InsertText(" xxxxxxxxx");
            #endregion
            editor.DrawTable(table, new Size(maxWidth, double.PositiveInfinity));
 
        }
 
        private static void DrawTitle(FixedContentEditor editor, double maxWidth)
        {
            Block block = new Block();
            block.HorizontalAlignment = Telerik.Windows.Documents.Fixed.Model.Editing.Flow.HorizontalAlignment.Center;
            block.TextProperties.Font = FontsRepository.HelveticaBold;
            block.TextProperties.FontSize = 16;
            block.InsertText("xxxxxxxxx");
            block.InsertText("<xxxxxxxxx>");
            editor.DrawBlock(block, new Size(maxWidth, double.PositiveInfinity));
        }
 
        private static void DrawTableWithDetails(FixedContentEditor editor, double maxWidth)
        {
            Table table = new Table();
            table.LayoutType = TableLayoutType.FixedWidth;
            table.DefaultCellProperties.Padding = new Thickness(1);
            Border border = new Border();
            Border whiteBorder = new Border(0, BorderStyle.None, new RgbColor(255, 255, 255));
            table.DefaultCellProperties.Borders = new TableCellBorders(border, border, border, border);
            #region FIRST ROW
            TableRow firstRow = table.Rows.AddTableRow();
            TableCell firstCell = firstRow.Cells.AddTableCell();
            Block firstBlock = firstCell.Blocks.AddBlock();
            firstBlock.TextProperties.Font = FontsRepository.HelveticaBold;
            firstBlock.InsertText("xxxxxxxxx");
            TableCell secondCell = firstRow.Cells.AddTableCell();
            Block secondBlock = secondCell.Blocks.AddBlock();
            secondBlock.TextProperties.Font = FontsRepository.HelveticaBold;
            secondBlock.InsertText("xxxxxxxxx");
            #endregion
            #region SECOND ROW
            TableRow secondRow = table.Rows.AddTableRow();
            firstCell = secondRow.Cells.AddTableCell();
            firstCell.Borders = new TableCellBorders(border, border, border, whiteBorder);
            firstBlock = firstCell.Blocks.AddBlock();
            firstBlock.TextProperties.FontSize = 10;
            firstBlock.InsertText("xxxxxxxxx");
            secondCell = secondRow.Cells.AddTableCell();
            secondCell.Borders = new TableCellBorders(border, border, border, whiteBorder);
            secondBlock = secondCell.Blocks.AddBlock();
            secondBlock.TextProperties.FontSize = 10;
            secondBlock.InsertText("xxxxxxxxx");
            #endregion
            editor.DrawTable(table, new Size(maxWidth, double.PositiveInfinity));
        }
 
        private static void DrawReceiverTable(FixedContentEditor editor, double maxWidth)
        {
            Table table = new Table();
            table.LayoutType = TableLayoutType.FixedWidth;
            table.DefaultCellProperties.Padding = new Thickness(1);
            Border border = new Border();
            Border whiteBorder = new Border(0, BorderStyle.None, new RgbColor(255, 255, 255));
            table.DefaultCellProperties.Borders = new TableCellBorders(border, border, border, border);
            #region TABLE CONTENT
            TableRow firstRow = table.Rows.AddTableRow();
            TableCell firstCell = firstRow.Cells.AddTableCell();
            Block firstBlock = firstCell.Blocks.AddBlock();
            firstBlock.TextProperties.Font = FontsRepository.HelveticaBold;
            firstBlock.InsertText("xxxxxxxxx");
 
            TableRow secondRow = table.Rows.AddTableRow();
            firstCell = secondRow.Cells.AddTableCell();
            firstCell.Borders = new TableCellBorders(border, border, border, whiteBorder);
            firstBlock = firstCell.Blocks.AddBlock();
            firstBlock.TextProperties.FontSize = 10;
            firstBlock.InsertText("xxxxxxxxx");
            #endregion
            editor.DrawBlock(table, new Size(maxWidth, double.PositiveInfinity));
        }
}
Nikolay Demirev
Telerik team
 answered on 13 Jun 2019
3 answers
512 views

I've recently been given the task of turning some labels that we use to put on hardcopy documents into format that can be printed with a small label printer that takes 62mm label tape.

Basically, the user types all the data for the label into a form. I then store the details for them in a grid. When they are ready to print the label, they click a print button that is in my grid. The data for the label is put into a pdf and they print it from the pdf.

The label printer uses a continuous roll or tape so that the text fields can be as long as they want. I'm currently putting all the details into a Table object and then I draw the table with a width of 62mm.

How can I find what the height of the table would be when the width is 62mm so that I can set the height of the page?

 

public RadFixedDocument CreateDocument()
        {
            RadFixedDocument document = new RadFixedDocument();
            RadFixedPage page = document.Pages.AddPage();
            page.Size = new Size(Telerik.Windows.Documents.Media.Unit.MmToDip(62), Telerik.Windows.Documents.Media.Unit.MmToDip(100));
            FixedContentEditor editor = new FixedContentEditor(page);

            Table table = CreateDetailsTable();
                        
            editor.DrawTable(table, Telerik.Windows.Documents.Media.Unit.MmToDip(62));

            return document;
        }

Georgi
Telerik team
 answered on 11 Jun 2019
9 answers
868 views
I am currently working on a task to export records from to excel file for a client in an . I want to know the maximum number of records and number of columns that can be exported using library. And I would also like to know the limitations of using this library for exporting large files with 3 to 5 lakhs of records.
Richard
Top achievements
Rank 1
 answered on 08 Jun 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?