Does anyone know how to handle columns? it appears that this is not a feature Telerik has added yet which i think is a Big oversight.
Most business related documents i have encountered all have columns which means when i tried to use Telerik's component they get all screwed up and not formatted right. Anyone have a suggestion how to address this short coming in code?
I sure hope Telerik realizes this is a big oversight and for Wordprocessing to be taken seriously they will need this.
In the mean time i either need to move to a different vendor component, or hopefully find a solution here...
any ideas?
I am trying to incorporate the latest build with ZipArchive rather than ZipPackage and am having difficulty getting it to create a valid zip file. Here is what works using the ZipPackage:
Dim VehicleID As Int32 = CInt(ddVehicleList.SelectedValue) Dim memStream As New MemoryStream() Dim Package As ZipPackage = ZipPackage.Create(memStream) If VehicleID <> 0 Then Dim fileIndex As Int32 = 0 For Each lvItem As ListViewItem In lvImages.Items Try Dim cbSelected As CheckBox = lvItem.FindControl("cbSelected") If cbSelected.Checked Then fileIndex += 1 Dim url As String = cbSelected.Attributes("url") Dim photo As ZipData.Photo = GetPhotoWithTagByURL(url, lvItem, fileIndex) Dim stream As Stream = New MemoryStream(photo.Data) Package.AddStream(stream, photo.Name) End If Catch ex As Exception End Try Next Else End If
SendZipToClient(memStream, Package
Private Sub SendZipToClient(memStream As MemoryStream, Package As ZipPackage) Dim FileName As String = ddVehicleList.SelectedItem.Text.Trim.Replace(" ", "_") Package.Close(False) memStream.Position = 0 If memStream IsNot Nothing AndAlso memStream.Length > 0 Then Response.Clear() Response.AddHeader("content-disposition", "attachment; filename=" + FileName + "_images.zip") Response.ContentType = "application/zip" Response.BinaryWrite(memStream.ToArray()) Response.[End]() End If End Sub
This is what I have so far with ZipArchive (gives me an invalid zip file):
Dim VehicleID As Int32 = CInt(ddVehicleList.SelectedValue) Dim memStream As New MemoryStream() Dim Archive As New ZipArchive(memStream, ZipArchiveMode.Create, False, System.Text.Encoding.UTF8) If VehicleID <> 0 Then Dim fileIndex As Int32 = 0 For Each lvItem As ListViewItem In lvImages.Items Try Dim cbSelected As CheckBox = lvItem.FindControl("cbSelected") If cbSelected.Checked Then fileIndex += 1 Dim url As String = cbSelected.Attributes("url") Dim photo As ZipData.Photo = GetPhotoWithTagByURL(url, lvItem, fileIndex) Dim stream As Stream = New MemoryStream(photo.Data) 'Package.AddStream(stream, photo.Name) Dim lAttachment As ZipArchiveEntry = Archive.CreateEntry(photo.Name) Using lAttachmentStream = lAttachment.Open() Using lStreamWriter = New StreamWriter(stream) lStreamWriter.Flush() End Using End Using lAttachment.Dispose() End If Catch ex As Exception End Try Next Else End If SendZipToClient(memStream, Archive)Private Sub SendZipToClient(memStream As MemoryStream, Package As ZipArchive) Dim FileName As String = ddVehicleList.SelectedItem.Text.Trim.Replace(" ", "_") 'Package.Close(False) memStream.Position = 0 If memStream IsNot Nothing AndAlso memStream.Length > 0 Then Response.Clear() Response.AddHeader("content-disposition", "attachment; filename=" + FileName + "_images.zip") Response.ContentType = "application/zip" Response.BinaryWrite(memStream.ToArray()) Response.[End]() End If End SubCan you please tell me what I am doing wrong?
Thanks.
Charles

I want to set the paper type and ScaleFactor of worksheet but the code below for papertype and scalefactor does not compile. I would like some help with this.
WorksheetPageSetup pageSetup = wb.ActiveWorksheet.WorksheetPageSetup;
pageSetup.Margins = new PageMargins(25.00, 25.00, 25.00, 25.00);
pageSetup.PaperType = PaperType.Letter;
pageSetup.ScaleFactor = new Size(0.9, 0.9);

Hi
We are working on a module which will accept data from a web api web service, use it to populate a word document via mail merge and save the document as a PDF. Is this a situation that RadWordsProcessing will be help with?
Regards
John

Is there a reliable way to detect a bad password when opening a ZipArchive? I'm currently getting an InvalidOperationException when reading the first entry, and the message is a generic "Invalid data". Exception shared below.
Telerik.Windows.Zip.InvalidDataException occurred
HResult=-2146233088
Message=Invalid data
Source=Telerik.Windows.Zip
StackTrace:
at Telerik.Windows.Zip.DeflateDecompressor.SetPreviousCode() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Frameworks\Zip\Compression\Deflate\DeflateDecompressor.cs:line 630
at Telerik.Windows.Zip.DeflateDecompressor.ReadTreeCodes() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Frameworks\Zip\Compression\Deflate\DeflateDecompressor.cs:line 589
at Telerik.Windows.Zip.DeflateDecompressor.DecodeDynamicBlockHeader() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Frameworks\Zip\Compression\Deflate\DeflateDecompressor.cs:line 534
at Telerik.Windows.Zip.DeflateDecompressor.CheckDecodeState() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Frameworks\Zip\Compression\Deflate\DeflateDecompressor.cs:line 274
at Telerik.Windows.Zip.DeflateDecompressor.Decode() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Frameworks\Zip\Compression\Deflate\DeflateDecompressor.cs:line 233
at Telerik.Windows.Zip.DeflateDecompressor.Inflate(Byte[] bytes, Int32 offset, Int32 length) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Frameworks\Zip\Compression\Deflate\DeflateDecompressor.cs:line 736
at Telerik.Windows.Zip.DeflateDecompressor.ProcessTransform(Boolean finalBlock) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Frameworks\Zip\Compression\Deflate\DeflateDecompressor.cs:line 181
at Telerik.Windows.Zip.CompressionTransformBase.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Frameworks\Zip\Compression\CompressionTransformBase.cs:line 162
at Telerik.Windows.Zip.OperationStream.Read(Byte[] buffer, Int32 offset, Int32 count) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Frameworks\Zip\OperationStream.cs:line 395
at Telerik.Windows.Zip.CompressedStream.Read(Byte[] buffer, Int32 offset, Int32 count) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Frameworks\Zip\Compression\CompressedStream.cs:line 155
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at System.IO.Stream.CopyTo(Stream destination)
at PacketMonitor.BinaryLog.LogReader.Open(String fileName, String password)
InnerException:

Hello,
I am struggling setting the Font Size of all the Text in my Table that i am drawing inside of my pdf document. It seems like it is defaulting to either 10 or 12... I need to display at least 4 columns in a row, and i want to reduce the font size to at least 8. Is there any way to do this without setting up a unique block each time and then trying to add it to Cell, and Row , etc...
My code looks like this below:
---------------------------------------------------------------------------------------------------------------------------------------------------------
Dim RevenueTable As New Table()
Dim firstRow As TableRow = RevenueTable.Rows.AddTableRow()
firstRow.Cells.AddTableCell().Blocks.AddBlock().InsertText("---------------------------")
firstRow.Cells.AddTableCell().Blocks.AddBlock().InsertText("--------------------SERVICE")
firstRow.Cells.AddTableCell().Blocks.AddBlock().InsertText(" DETAILS-------------------")
firstRow.Cells.AddTableCell().Blocks.AddBlock().InsertText("---------------------------")
Dim secondRow As TableRow = RevenueTable.Rows.AddTableRow()
secondRow.Cells.AddTableCell().Blocks.AddBlock().InsertText(objReceipt.SERVCODE(i))
secondRow.Cells.AddTableCell().Blocks.AddBlock().InsertText(objReceipt.SERVNAME(i))
secondRow.Cells.AddTableCell().Blocks.AddBlock().InsertText(objReceipt.SERVQTY(i))
secondRow.Cells.AddTableCell().Blocks.AddBlock().InsertText("")
Dim ServiceCodeRowDesc As TableRow = RevenueTable.Rows.AddTableRow()
ServiceCodeRowDesc.Cells.AddTableCell().Blocks.AddBlock().InsertText("Revenue Desc")
ServiceCodeRowDesc.Cells.AddTableCell().Blocks.AddBlock().InsertText("Item Price")
ServiceCodeRowDesc.Cells.AddTableCell().Blocks.AddBlock().InsertText("Qty")
ServiceCodeRowDesc.Cells.AddTableCell().Blocks.AddBlock().InsertText("Revenue Amount")
{....lines of code removed ....}
editor.TextProperties.FontSize = 8
editor.DrawTable(RevenueTable)
------------------------------------------------------------------------------------------------------------------------------------------------
The font size is not 8.
Hey,
I'm using a RadfixedDocument to create a Report and the PdfFormatProvider to export the Report to PDF.
Everything works fine, except for german Umlaut Letters (ä, ö, ü). They just disappear in the generated PDF. I couldn't find a switch in the Export Settings or anything else, can you give me some directions?
Cheers,
Jens
Hi there.
I have a Document i want to Search for a Specific Variable.
I need to get the parent container/block of the text.
thx