I'm using Telerik in an interop environment with C++ and trying to replace our old ZIP library. With the code below it appears to ZIP all files correctly except the last file always has some error with it like it isn't being written out properly. I've changed the number and type of files and the specific file type doesn't matter, the last one in the archive is always corrupted when i test the archive.
System::String^ sSource = gcnew System::String(m_sPath1);
System::String^ sDest = gcnew System::String(sZipDest);
System::IO::File^ file = nullptr;
System::IO::Stream^ stream = file->Open(sDest, System::IO::FileMode::Create);
Telerik::Windows::Zip::ZipArchive^ zarchive = gcnew Telerik::Windows::Zip::ZipArchive(stream, Telerik::Windows::Zip::ZipArchiveMode::Create,
false
,System::Text::Encoding::UTF8);
Telerik::Windows::Zip::DeflateSettings^ compressionSettings = gcnew Telerik::Windows::Zip::DeflateSettings();
compressionSettings->CompressionLevel = Telerik::Windows::Zip::CompressionLevel::Best;
compressionSettings->HeaderType = Telerik::Windows::Zip::CompressedStreamHeader::ZLib;
pList3->ResetContent();
rc = 0;
nCount = pList1->GetCount();
for
(n = 0; n<nCount; n++) {
pList1->GetText(n, sFileName);
sFullyQualifiedFileNameFrom = fs.AppendWildcard(m_sPath1, sFileName);
int
nSel = pList3->AddString(sFileName);
pList3->SetCurSel(nSel);
pList3->UpdateWindow();
System::String^ sFull = gcnew System::String(sFullyQualifiedFileNameFrom.GetBuffer());
System::String^ sName = gcnew System::String(sFileName.GetBuffer());
Telerik::Windows::Zip::Extensions::ZipFile::CreateEntryFromFile(zarchive, sFull, sName, compressionSettings);
int
nFilesPercent = 100 * (n + 1) / nCount;
m_prStatus.SetPos(nFilesPercent);
}
Sleep(5000);
stream->Flush();
stream->Close();
Is there something else that should be done to finish the compression/writing of the last file when in the loop using CreateEntryFromFile?
Hi
I'm using RadFixedDocumentEditor to insert several line of text (editor.InsertRun and editor.InsertLine).
I use InsertLine and like HorizontalAlignment = left.
But how can I insert justified line of text ? Is it possible ??
Tanks
Hi
I'm using the next code to generate a simple pdf
RadFixedDocumentEditor editor = new RadFixedDocumentEditor(document)
editor.SectionProperties.PageSize = new Size(Unit.MmToDip(210), Unit.MmToDip(297));
editor.ParagraphProperties.HorizontalAlignment = HorizontalAlignment.Center;
editor.CharacterProperties.Font = FontsRepository.TimesRoman;
editor.InsertParagraph();
editor.InsertRun("Test è ò");
This issue is that the è and ò character are NOT printed at all.
Tnx ...
https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/cross-platform
Accessed from this page:
https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/getting-started
Thanks,
Joel
Hi,
In my app on azure cloud, I need to convert docx, xlsx and html file to pdf and, I'm trailing your library. The code from this example works fine locally but when I publish it to azure I get error 500. My test function app service runs in Standard pricing tier. Are there any specific requirements?
Thanks,
b.
Hello,
I have some code to import a Word-document with MergeFields, than I MailMerge it with some data end export it to a new document.
This works fine, but I also want to fill a table in the document. How can this be done?
I was trying something like this, but this doesn't work ...
Thanks for any help you guys can give!
using System.Collections.Generic;
Hello, i use library for manipulate word (RadFlowDocumentEditor) and i need to save file in PDF i use PdfFormatProvider, i use free of 9 font in word for print a barcode, but after i save in pdf does not print a font with barcode.
what can I do? It's possible include font?
Hi,
I am trying to convert a PDF to an image server side in our .Net MVC application.
I have seen this forum post https://www.telerik.com/forums/convert-pdf-to-jpg and it explains how to convert a pdf to an image but those libraries don't seem to be available in an MVC application.
Is there a solution that I can use for my application?