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
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

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



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)); }}
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;
}

Hi,
Is there a way to set background for IRowExporter like set color for ICellExporter,seems we only can loop all cells in a row and set one by one now ?
thank you !

currently ,we can set fore color for cell ,like
ICellExporter cellExporter = rowExporter.CreateCellExporter()
var color = System.Drawing.ColorTranslator.FromHtml("#0095ff");
cellExporter.SetFormat(new SpreadCellFormat() { ForeColor = new SpreadThemableColor(new SpreadColor(color.R, color.G, color.B))} );
but how to set background color for cell,i searched API but find nothing,anyone good idea?
thank you
