Hi,
as a proof of concept, I want to load a Docx in a Kendo Editor and save it back. So far, I'm able to
The issues I have is that the new docx don't have the same margins as the original document and it also takes 4 pages instead of 2. You can take a look at the screenshots attached (before/after).
Is there a way to configure the styles and the page setup ?
here is the code that I use. Basically, I have a Kendo Editor in my view that loads the HTML and a button to save back the data
[HttpPost]public ActionResult Editor(string editor){ // HTML decode the value before using it. var notes = System.Web.HttpUtility.HtmlDecode(editor); var htmlProvider = new HtmlFormatProvider(); RadFlowDocument document = htmlProvider.Import(notes); SaveDocx(document); return View();}public ActionResult Editor(){ RadFlowDocument sourceDoc = GetSourceDocument(); SaveDocx(sourceDoc); var myHtmlContent = GetHtmlFromDocument(sourceDoc); ViewBag.MyHtmlContent = myHtmlContent; return View();}private RadFlowDocument GetSourceDocument(){ var docxProvider = new DocxFormatProvider(); var stream = new MemoryStream(System.IO.File.ReadAllBytes(@"c:\Temp\TelerikMvcApp1\TelerikMvcApp1\Fiche.docx")); RadFlowDocument document; using (Stream input = System.IO.File.OpenRead(@"c:\Temp\TelerikMvcApp1\TelerikMvcApp1\Fiche.docx")) { document = docxProvider.Import(stream); } return document;}private string GetHtmlFromDocument(RadFlowDocument document){ var myHtmlContent = ""; using (MemoryStream ms = new MemoryStream()) { HtmlFormatProvider htmlProvider = new HtmlFormatProvider(); myHtmlContent = htmlProvider.Export(document); } return myHtmlContent;}private void SaveDocx(RadFlowDocument document){ using (Stream output = System.IO.File.OpenWrite(String.Format(@"c:\Temp\TelerikMvcApp1\TelerikMvcApp1\Fiche{0}.docx", DateTime.Now.Ticks))) { DocxFormatProvider docxProvider = new DocxFormatProvider(); docxProvider.Export(document, output); }}
thanks
Hi,
I am creating an pdf document from an html, which contains a number of images. I notice a difference between the pdf created and when viewing the html in a browser. For example the html contains css to resize the images, however it appears this does not happen during the pdf conversion process, so the images look too big.
Thanks
I use the code below to create the pdf
try { using (var inputHtml = new MemoryStream(htmlEncoding.GetBytes(sourceString))) { var htmlProvider = new HtmlFormatProvider(); var document = htmlProvider.Import(inputHtml); var editor = new RadFlowDocumentEditor(document); using (Stream output = new FileStream(targetFolder + targetFilename, FileMode.OpenOrCreate)) { var pdfProvider = new PdfFormatProvider(); pdfProvider.Export(document, output); } } }

Hi,
please help me.
This is my problem:
I compress some files with this code
Try
Using st As Stream = File.OpenWrite(FileZippato)
Using zipArchive As ZipArchive = New ZipArchive(st, ZipArchiveMode.Create, False, Nothing)
For Each f As String In FileOrigine
Extensions.ZipFile.CreateEntryFromFile(zipArchive, f, Path.GetFileName(f))
Next
End Using
End Using
Catch ex As Exception
Globale.Log.BoxErrore(ex)
End Try
so everything is right
when I unzip the file with
Extensions.ZipFile.ExtractToDirectory(FileOrigine, CartellaDestinazione)
catch this exception "folder access denied".
of course access to this folder is totally free
Hello,
I am currently moving from exporting a RadGridView from ExcelML to SpreadProcessing. Everything exports fine and I am able to set most of the options I need that relate to printing except one option.
In excel, there is an option for "Scale To Fit". I'd like this to be set to 1 page automatically on export so all columns fit on one page regardless of how many there are. I know there is a ScaleFactor on the WorksheetPageSetup but would like it to be more dynamic.
Thanks,
Chris


Hi,
I have stripped our use down to be a very simple data-dump.
Row 1 = column headers
Rows 2 to N = data
I am using the auto filtering feature
sheet.Filter.FilterRange = sheet.UsedCellRange;
once all the data has been written
File is being saved
IWorkbookFormatProvider XSLXwriter = new XlsxFormatProvider();
using (FileStream filestream = new FileStream(filename, FileMode.Create))
XSLXwriter.Export(output, filestream);
Output is a Workbook and filename is a unique string.
I am simulating a user experience of wanting to us the sorting options provided within Excel however this causes a crash and the file to be recovered. Saving and re-opening fixes this problem. Comparing workbook.xml from the before(which crashes) and after(save as copy) it looks like this is missing.
<definedNames>
<definedName name="_xlnm._FilterDatabase" localSheetId="0" hidden="1">Sheet1!$A$1:$GJ$531</definedName>
</definedNames>
<calcPr calcId="0"/>
If you could advise on solving this issue it would be great.
Many Thanks

Is it possible to format some parts of the text inside a cell? Something like the formatting shown in the attached image.

I'm new to creating with PDFs and this control. I'm trying to create a PDF that could be used to print an employee ID badge. It looks like the whole card will need to be about 250 x 360 pixels, based on a template someone sent me that can be used to print now.
How does image quality work with this control? Can images be added with a higher resolution than the pixels used when placing it in the PDF?
