Hi,
Working on a web application, i've built a mail merge program on server side. This last one reads a word document as a model and performs a merge by using Telerik librairies.
In this case, the models are very user dependant (basically every agency has its own format for each type of document), so I need to provide a graphical tool to format the models, add and remove merge fields. Is there any telerik component capable of doing so ? Or, is there any other suggested solution ?
Best resgards
I'm using Rad Fixed Content Editor to export pdf but i cant find a way to set a static header through my main table.
I mean i have a document with a table and other contents. I want to set a static header for this table only
Please help me
Hi,
I m trying to make footer right justify but unable to find any reference for this scenario. Here is my code
Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider formatProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
int numberOfPages = formatProvider.ExportToFixedDocument(doc).Pages.Count;
RadFlowDocumentEditor editor = new RadFlowDocumentEditor(doc);
editor.MoveToParagraphStart(doc.Sections(0).Footers.Add().Blocks.AddParagraph());
editor.InsertText("Page ");
editor.InsertField("PAGE", "Page number will be evaluated on each page footer.");
editor.InsertText(" of ");
editor.InsertField("NUMPAGES", numberOfPages.ToString());
Any help would be greatly appreciated.
I use folowing function to Import Byte array into RadFixedDocument
private
RadFixedDocument GetFixedDocument(
byte
[] Content)
{
using
(var contentStream =
new
MemoryStream(Content))
{
PdfFormatProvider formatProvider =
new
PdfFormatProvider(contentStream,
FormatProviderSettings.ReadAllAtOnce);
return
formatProvider.Import();
}
}
I become Nullreference Exception for Parameter Pages in Method import with following Stacktrace:
bei Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.PdfContentManager.GetPages()
bei Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.GetPages(RadFixedDocumentInternal doc)
bei Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.LoadPages()
bei Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.Import()
Hi,
I have a fairly complex docx file, in which I want to replace some text using the ReplaceText method, and managed to do so, until today, when I tried to insert a newline into my "new text". To be more specific
Old text: "lorem ipsum VAR_TEXT".
Using: editor.ReplaceText("VAR_TEXT", "dolor"), it works, and the output is "lorem ipsum dolor", as expected.
Now I want to do this: editor.ReplaceText("VAR_TEXT", "dolor \n\r sit amet"), and achieve:
lorem ipsum dolor
sit amet
but what I always get is lorem ipsum dolor sit amet
I also tried with: Environment.NewLine, \n, \n\r, \r\n, <br>, <br />, <w:br /> ...all failed.
Can you please help me out? Thank you!
Hello we have been getting large PDF files in the 80 MBs range and need to compress these. Some clients are scanning in too high resolution and in color. I have tried several Telerik code examples for importing and exporting, but have had no successful attempts at reducing the file size. Most made the same PDF size, but some examples resulted in larger PDF sizes. There was a grayscale example in the a thread, but that increased the file size by about 50% regardless of the PDF. Is there an example on importing, running a compression scheme, and then exporting that results in smaller PDFs?
Thank you.
Can someone tell me how can i export a docx document into pdf with password?
I tried the following but i get a corrupted pdf file:
RadFixedDocument documentFromPDFtmp = new RadFixedDocument();
Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider providerFromPDFtmp = new Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider();
var fileFormatProvider = new DocxFormatProvider();
RadFlowDocument documentFromWord = fileFormatProvider.Import(sourceFile.InputStream); ;
IFormatProvider<RadFlowDocument> formatProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
using (MemoryStream ms = new MemoryStream())
{
formatProvider.Export(documentFromWord, ms);
using (Stream stream = ms)
{
documentFromPDF = providerFromPDFtmp.Import(stream);
}
using (Stream output = new FileStream(path, FileMode.OpenOrCreate))
{
providerFromPDFtmp.ExportSettings.IsEncrypted = true;
providerFromPDFtmp.ExportSettings.UserPassword = Utils.GetConfigValue("PassPhrase");
providerFromPDFtmp.ExportSettings.ImageQuality = ImageQuality.Medium;
providerFromPDFtmp.Export(documentFromPDFtmp, output);
}
}
Looking forward for help with that
Thanks,
Hagai.