Hi,
Which is the better way of getting the 'as displayed' cell value?
Dim selection As CellSelection = worksheet.Cells(i, j) Dim value As ICellValue = selection.GetValue().Value Dim format As CellValueFormat = selection.GetFormat().Value Dim formatResult As CellValueFormatResult = format.GetFormatResult(value) Dim result As String result = value.GetResultValueAsString(format) 'vs. result = formatResult.VisibleInfosText
Thanks,
Sid
Hi,
I like to use the PageSetup in RadSpreadstreamProcessing. I have an generated Excel File and I would like to set Papersize and other configurations. When I integrate it in my Code the IPageSetupExporter is not known.
using (IWorkbookExporter workbookExporter = SpreadExporter.CreateWorkbookExporter(format, documentStream))
{
using (IWorksheetExporter worksheetExporter = workbookExporter.CreateWorksheetExporter(nameWorksheet))
{
..........
using (IPageSetupExporter pageSetupExporter = worksheetExporter.CreatePageSetupExporter())
{
..................
}
}
}
I get also the message that the IWorksheetExporter doesn't include a definition "CreatePageSetupExporter"?
Has anyone an example how to use this?
Regards
John
Hello,
many problemes with this code :
PdfFormatProvider provider = new PdfFormatProvider();
RadFixedDocument document = provider.Import(File.ReadAllBytes(InputFileWithInteractiveForms6));
with pdf exemple of telerik (InteractiveForms.pdf) it is ok.
with pdf issues of Excel or Word on my pc (save as .pdf) it is ok.
but with pdf issues of Nuance Software.
sometime, i have this error : Object reference not set to an instance of an object
sometime : Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.PdfResource' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfDictionary
the properties of my file are :
can you help me ?
thank you
eric
Hi there,
What is the easiest way to change the font weight of a text?
Thank you.
I've been scouring the docs, but I can't find anything.
I have to fall back to using a Syncfusion PDF, but I want to remove that dependency.
Hi,
Is there any way to convert/rasterize an existing PDF file to JPG file(s) using PDFProcessing library?
Regards
Blas
As explained in https://www.telerik.com/forums/size-of-pdf-document
RadPdfProcessing does not embed the whole font but instead embeds only the font subset of the used characters which guarantees minimum font size
I want to use a docx as a template for PDF, so from your sample github https://github.com/telerik/document-processing-sdk/tree/master/WordsProcessing/ContentControls
I use Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider.ExportToFixedDocument to create a RadFixedDocument
then use Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider to export to final PDF.
The problem is the docx is using non standard font, so when I embed the font set (normal, italic, bold, italic bold) the final PDF size reached 3MB with just simple text and no image. This PDF is definitely embedding the full font sets, not the subset.
Is this scenario unsupported or bug?
I modified your DocumentGenerator.cs in ContentControls_NetStandard project. Must copy the segoeui.ttf and seguili.ttf to the SampleData folder.
//overwrite this
private void Save(RadFlowDocument document)
{
IFormatProvider<RadFlowDocument> formatProvider = new DocxFormatProvider();
string path = "CVTemplate.docx";
using (FileStream stream = File.OpenWrite(path))
{
formatProvider.Export(document, stream);
}
Console.WriteLine("Document generated.");
ProcessStartInfo psi = new ProcessStartInfo()
{
FileName = path,
UseShellExecute = true
};
Process.Start(psi);
//modification
ExportToFixedDocumentPdfFromRadFlowDocumentDocx(document);
}
private void ExportToFixedDocumentPdfFromRadFlowDocumentDocx(RadFlowDocument document)
{
//handle png image for NetStandard
Telerik.Windows.Documents.Extensibility.JpegImageConverterBase jpegImageConverter = new Telerik.Documents.ImageUtils.JpegImageConverter();
Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.JpegImageConverter = jpegImageConverter;
using (FileStream stream = File.Create("ExportedToFixedDocumentPdfFromRadFlow_with_embeddedFont.pdf"))
{
// Read the font file -- copy these 2 ttf to sample folder
byte[] fontDataNormal = File.ReadAllBytes($"{SampleDataFolder}segoeui.ttf");
byte[] fontDataLight = File.ReadAllBytes($"{SampleDataFolder}seguili.ttf");
// Register the font set
Telerik.Documents.Core.Fonts.FontFamily fontFamily = new Telerik.Documents.Core.Fonts.FontFamily("Segoe UI");
Telerik.Documents.Core.Fonts.FontFamily fontFamily2 = new Telerik.Documents.Core.Fonts.FontFamily("Segoe UI Light");
Telerik.Windows.Documents.Fixed.Model.Fonts.FontsRepository.RegisterFont(
fontFamily,
Telerik.Documents.Core.Fonts.FontStyles.Normal,
Telerik.Documents.Core.Fonts.FontWeights.Normal, fontDataNormal);
Telerik.Windows.Documents.Fixed.Model.Fonts.FontsRepository.RegisterFont(
fontFamily2,
Telerik.Documents.Core.Fonts.FontStyles.Normal,
Telerik.Documents.Core.Fonts.FontWeights.Normal, fontDataLight);
//export the docx RadFlowDocument to RadFixedDocument
var radFixedDocument = (new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider()).ExportToFixedDocument(document);
var fixedFormatProvider = new Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider();
fixedFormatProvider.Export(radFixedDocument, stream);
}
}
Hello,
I have the following code that loads a PDF :
byte
[] file = File.ReadAllBytes(@
"c:\big.pdf"
);
RadFixedDocument doc =
null
;
var prov =
new
PdfFormatProvider();
using
(var input =
new
MemoryStream())
{
input.Write(file, 0, file.Length);
doc = prov.Import(input);
}
On import I am getting the following exception :
Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfReal' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfName'.
I attached the pdf used to this. Could you please let me know what the problem is? (Telerik version used is 2017.1.116.40)
Thank you.