I work for a company that heavily leverages Telerik controls in our core applications. I’ve been tasked with exploring the PDF options available in hopes of replacing our current PDF exports with Telerik equivalents to help move away from an unwanted software license.
In exploring the demos and product features it appears to me that rendering HTML content is limited to the RadClientExportManager and therefore is client side only, while server document creation requires the more elemental building of documents by plotting text, and graphics manually via .NET code.
Is this an accurate assessment? What would you recommend to someone wanting to render HTML content on the server where there is no actual browser or user involvement?
We currently convert data populated WebForm pages into PDF files all on the server that are never delivered to a user via browser interaction, or even requested by a browser (automated generation.)
Aside from an HTML source being easier to use and maintain, it would plug right into our existing situation and not require use to reconstruct our forms in C#. That is obviously a more attractive option for us.
I am very impressed with the functionality of the client side rendering, it just doesn’t appear to cover a lot of common use cases that we happen to fall under.
Hi,
i want to convert HTML to Pdf in c# api in .net Core 2, an you please suggest best way
I want to report bug with this code:
byte[] file = File.ReadAllBytes("Test.pdf");
RadFixedDocument document = null;
var prov = new PdfFormatProvider();
using (var input = new MemoryStream())
{
input.Write(file, 0, file.Length);
document = prov.Import(input);
}
When I tried to import my document to RadFixedDocument it says:
Ex: {"Stack empty."}
Stack trace:
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Stack`1.Peek()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.Parser.PostScriptReader.PushToken(PdfPrimitive primitive)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.Parser.PrimitiveParsers.ArrayParser.End()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.Parser.PostScriptReader.<BuildStateMachine>b__8(PostScriptReaderArgs b)
at Telerik.Windows.Documents.Data.StateMachine.State`1.ExecuteActionIfNotNull(Action`1 action, TArgs arguments)
at Telerik.Windows.Documents.Data.StateMachine.State`1.Enter(TArgs arguments)
at Telerik.Windows.Documents.Data.StateMachine.StateMachine`1.GoToState(State`1 state, TArgs arguments)
at Telerik.Windows.Documents.Data.StateMachine.StateMachine`1.GoToNextState(TArgs arguments)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.Parser.PostScriptReader.Read(IPdfImportContext context, Int64 endPosition)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.Parser.PostScriptReader.Read(IPdfImportContext context)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.ContentStreamInterpreter.ReadContentPrimitives()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.ContentStreamInterpreter.Execute()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.ContentStream.ParseContentData(Byte[] data, IRadFixedDocumentImportContext context, IResourceHolder resourceHolder, IContentRootElement contentRoot)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.Page.CopyPropertiesTo(PostScriptReader reader, IRadFixedDocumentImportContext context, RadFixedPage fixedPage)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.DocumentCatalog.CopyPagePropertiesTo(PostScriptReader reader, IRadFixedDocumentImportContext context)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.DocumentCatalog.CopyPropertiesTo(PostScriptReader reader, IRadFixedDocumentImportContext context)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.RadFixedDocumentImportContext.BeginImportOverride()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.BaseImportContext.BeginImport(Stream pdfFileStream)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.PdfImporter.Import(Stream input, IPdfImportContext context)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.ImportOverride(Stream input)
at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Import(Stream input
Please fix this issue.
Good morning,
When going through the PDF with PdfProcessing, it gives me weird text in some elements which I presume is metadata of the pdf.
As for other PDFs who are not created out of Telerik it works fine...
I also checked the Telerik forum a lot, desperately finding a possible and proper solution/alternative for this, but unfortunately.
I just simply need to read normal text out of my Telerik report, I don't want to export the text, I only wanna extract that text so I can draw an image under it.
My question is simple : Does Telerik have solutions to deal with this issue?
I have attached a snippet of my problem when I'm debugging in Visual Studio and the Telerik Report I try to read.
Thanks
Kurt Berlanger
I'm trying to write a simple script to merge two files together.
The files that are created show as corrupt. Is there something im doing wrong?
Sub
Main()
Dim
file1
As
Byte
() = ReadFile(
"e:\test1\test1.pdf"
)
Dim
result
As
New
IO.MemoryStream
Dim
fileWriter
As
New
PdfStreamWriter(Result,
True
)
Dim
pdfSource
As
New
PdfFileSource(
New
IO.MemoryStream(file1))
For
Each
pg
As
PdfPageSource
In
pdfSource.Pages
fileWriter.WritePage(pg)
Next
Dim
b
As
Byte
()
b = Result.ToArray()
Dim
writer
As
IO.FileStream = IO.File.OpenWrite(
"e:\test1\abc12222.pdf"
)
writer.Write(b, 0, b.Length)
writer.Close()
End
Sub
Function
ReadFile(filename
As
String
)
As
Byte
()
Dim
io
As
New
IO.FileInfo(filename)
Dim
fs
As
IO.FileStream = io.OpenRead
Dim
b()
As
Byte
ReDim
b(io.Length)
fs.Read(b, 0, io.Length)
fs.Close()
Return
b
End
Function
hi sir,
I compress the main level with five level of sub folder using telerik it compress in to one single folder.But i want same like as before compress(i want to follow same folder structure while extract).
the below image show as original
http://prntscr.com/o7djqa
this one i need
http://prntscr.com/o7dkmt
but it show
http://prntscr.com/o7dkmt
i send the project it has two button button one work i use oridanry zip format but button2 not work properly i use telerik
https://www.dropbox.com/s/i5pwsbbthkab5jy/WebSitesss.rar?dl=0
Hello,
I have a RadFlowDocument that I am exporting to PDF via the standard flow PDFFormatProvider. If the document has some text that used the Arial Narrow font that is either bold, italicized or both the PDF output is always showing just plain Arial Narrow. This seems to be the only font that is having this problem.
Has anyone else encountered this or have any suggestions on how to fix it?
Thanks,
-Tom