I noticed with 2017 R2, you just added Form Fields handling, thats great!
I reviewed another posting about iterating through images in a PDF. Can those images be extracted and replaced with another image?
Does the PDFProcessing library allow adding a watermark to existing PDF?
Thanks
Peter
Hi
I use this code to convert pdf to List<image> but the resolution is not so high and the QR code inside the page is not detachable
Is there some way to improve the resolution (more DPI)?
public
static
List<ImageSource> ConvertPdfToImage(
string
filePath)
{
List<ImageSource> result =
new
List<ImageSource>();
ThumbnailFactory tf =
new
ThumbnailFactory();
using
(Stream stream = File.Open(filePath, FileMode.Open))
{
PdfFormatProvider formatProvider =
new
PdfFormatProvider(stream, FormatProviderSettings.ReadAllAtOnce);
RadFixedDocument document = formatProvider.Import();
foreach
(RadFixedPage page
in
document.Pages)
{
ImageSource pageImg = tf.CreateThumbnail(page, page.Size);
result.Add(pageImg);
}
}
return
result;
}
Thank you
The documentation for the libraries included in Telerik Document Processing is available at http://docs.telerik.com/devtools/document-processing.
This week's latest resources are described below.
RadPdfProcessing
TextFragment
The content of this article is updated to describe the new properties added to the TextFragment class.
RadSpreadProcessing
Headers and Footers
The article is introduced to describe the new feature in RadSpreadProcessing - applying headers and footers when printing a document or exporting to PDF.
RadSpreadStreamProcessing
RadSpreadStreamProcessing
A new help section that explains how you could use the new RadSpreadStreamProcessing library to achieve fast export of spreadsheet documents with minimal memory usage.
Dear Telerik,
Currently I'm trying to export docx to pdf but got some errors.
Here is my export code:
PdfFormatProvider pdfer = new PdfFormatProvider();
using (Stream input = File.OpenRead("E:\\hd.docx"))
{
RadFlowDocument document = provider.Import(input);
pdfer.Export(document, new FileStream(@"E:\hd.pdf", FileMode.Create));
}
And I got this error: "cant convert RadFlowDocument to RadFixedDocument", also when I'm using RadDocument and IDocumentFormatProvider to export like some threads, visual studio couldn't found these class, interface.
My references at attachment file, please look at it.
Thank you very much for your help!
myBlock.InsertImage(
new
ImageSource(myJpegImageStream, ImageQuality.High));
Hello
The following method is supposed to import a PDF file and export it. It works as expected, except that the image is lost.
private
void
Test1()
{
var provider =
new
PdfFormatProvider();
var stream = File.OpenRead(@
"C:\inputFile.pdf"
);
var document = provider.Import(stream);
using
(var output =
new
FileStream(@
"C:\outputFile.pdf"
, FileMode.OpenOrCreate))
{
provider.Export(document, output);
}
}
You might say that the file is in bad format or something, but why would this work?
private
void
Test2()
{
var stream =
new
FileStream(@
"C:\inputFile.pdf"
, FileMode.Open, FileAccess.Read);
var source =
new
PdfDocumentSource(stream, FormatProviderSettings.ReadOnDemand);
ViewModel.DocumentSource = source;
}
DocumentSource is binded to the PdfViewer.DocumentSource.
Here is the link to the PDF inputFile: https://goo.gl/3lpe9O
Thank you
Hi
How can I clone a RadFixedPage and added to a new RadFixedDocument
I tried with this code but I get an error so I think that I need to clone the page before I can added to another document
RadFixedDocument originalDocument = pdfProcessingProvider.Import(inputPdfStream);
RadFixedDocument newDocument =
new
RadFixedDocument();
foreach
(var page
in
originalDocument.Pages)
{
newDocument.Pages.Add(page);//ERROR!!
}
Thank you
Hello, I need to export / convert an Excel file to Pdf file.
Unfortunately using Microsoft.Interop everything works in development but not in production.
I have been able to use the RadFlowDocument features to convert a Word file to pdf using the following code.
public
void
TransformPdf(
string
fileSource,
string
fileDestination)
{
IFormatProvider<RadFlowDocument> fileFormatProvider =
new
DocxFormatProvider();
using
(FileStream input =
new
FileStream(fileSource, FileMode.Open))
{
RadFlowDocument document = fileFormatProvider.Import(input);
byte
[] renderedBytes =
null
;
IFormatProvider<RadFlowDocument> formatProvider =
new
RtfFormatProvider();
using
(MemoryStream ms =
new
MemoryStream())
{
formatProvider.Export(document, ms);
renderedBytes = ms.ToArray();
File.WriteAllBytes(fileDestination, renderedBytes);
}
}
}
My question is: Do you have a similar or alternative way to make a pdf conversion using the Telerik libraries?
Thank you, Mario
hello i have docx file in memorystream and open in telerik zip.
I see all entries,files how to replaced some files in this zippackage and save to memorystream?