Telerik Forums
Telerik Document Processing Forum
1 answer
574 views

 

We are using the PDFFormatProvider and RadFlowDocument to convert the HTML string to PDF file.  We need a sample code to add the watermark image to the PDF file. 

Language : C#:

Please find the attached code

ex pdfProvider.Export(document);

 

Thanks

 

Regards,

Babu Durairaji

Dimitar
Telerik team
 answered on 20 Jul 2022
1 answer
260 views

Hello,

We had a situation with the Telerik packages recently bypassing firewalls of the networking in our environment. Actually our firewall blocks all the calls from outside including Telerik packages. The networking team whitelisted the domain nuget.telerik.com but the demanded packages still remained blocked. After an research we found out that Telerik uses a series of IP's (probably dynamic) and also subdomains for the packages. 

For the moment we have solved the problem because all the requested IP's of the Telerik packages are allowed in our firewall, but I was wondering if the IP's are dynamic and in a moment of time they will change we will be again in the starting point where is needed to create specific security policies for the new IP's.

So my question is:

Does Telerik have a range of IP's and domain/subdomains so we can add them from the beginning in our firewall?

I am not sure if there is another solution or Telerik provide documentation for similar situations.

 

Thank you!

Dimitar
Telerik team
 answered on 08 Jul 2022
0 answers
427 views

Hi,

After upgrading Telerik in a project I haven't visisted in the last 6-8 months, my Document Processing references are suddenly broken in the code.

The references in Nuget seems to be doing fine, but in the class where I build my Document Processing I am suddenly getting a ton of errors with for example; Workbook, CellIndex(), CellBorder, IWorkbookFormatProvider, ImageSource(), FloatingImage, RadHorizontalAlignment, ColumnSelection to name a few.

Do you have any experience with these sudden problems after upgrading? I upgraded via Nuget Package Manager.

Maybe I am missing something, but it it very frustrating when it has been working without problems before upgrading.

Kind regards,

Kirstine

Kirstine
Top achievements
Rank 1
 asked on 30 Jun 2022
1 answer
365 views

Hello,

I'm just learning to use Telerik so I hope you can help me. I have a large image of several pages and I need to export it complete to a pdf file. The pdf file must have the number of pages needed so the image is all there and it shouldn't have any added header (neither blank space) at top of evey page.

Right now, I'm able to export an image using RadFixedPage and PDFFormatProvider, but the image is only in one page and it's not complete.

RadFixedDocument document = new RadFixedDocument();
RadFixedPage page = document.Pages.AddPage();

PdfFormatProvider provider = new PdfFormatProvider();
FixedContentEditor editor = new FixedContentEditor(page);

....

using (Stream output = File.OpenWrite("output.pdf"))
{
    provider.Export(document, output);
}

 

Thanks in advance,

Dimitar
Telerik team
 answered on 21 Jun 2022
1 answer
778 views

Dear Team,

We are trying to import a pdf file into RadDocument by using PdfFormatProvider.Import() Method but getting exception "This specified method not found" Sample PDF file is attached and below is the piece of code for importing pdf into RadDocument. We need to set a watermark on pdf file by importing in RadDocument. We shall be very thankful to you for your prompt support. Thanks in advance.

string path = @"test watermark_2022_05_16_01_04_16_969_0_2742.pdf";
byte[] readText = File.ReadAllBytes(path);
Stream stream = new MemoryStream(readText);
Telerik.Windows.Documents.FormatProviders.Pdf.PdfFormatProvider pdfProvider = new Telerik.Windows.Documents.FormatProviders.PdfFormatProvider();
RadDocument rdocument = pdfProvider.Import(stream);--On This line exception "This specified method is not found"
Martin
Telerik team
 answered on 17 Jun 2022
3 answers
376 views

Hi,

I am currently generating a pdf file I need to in generall encrypt. But printing and copying should still be allowed.
Is this possible somehow?

 

Greetings

Benedikt

Martin
Telerik team
 answered on 09 Jun 2022
1 answer
307 views

Hello! I'm doing a conversion and ran into a problem. Export to pdf removes blank lines. I need them to stay.

Please help. Thanks in advance

 

this is my code

var htmlProvider = new DocxFormatProvider();
var document = htmlProvider.Import(data);
var pdfProvider = new PdfFormatProvider();
pdfProvider.ExportSettings.ShouldEmbedFonts = false;
return pdfProvider.Export(document);

 

link to files

 

Svilen
Telerik team
 answered on 06 Jun 2022
1 answer
164 views

Hi,

I am using the SpreadsheetProcessing library to import Excel files for reading data. I am sure there are other libs to use as well but as a long-time Telerik customer this was a very easy and neat way for me to import xlsx files without the need for any interops. Worked like a charm until i got a source file that contains Threaded Comments (Office365) which throws an exception on import.

I see that working with Threaded Comments are currently in development for 2022 R2 but is there a way to "ignore" them so not to throw an exception in import. I am not interested in the comments.

Thanks

Dimitar
Telerik team
 answered on 03 Jun 2022
0 answers
315 views

Hi,

 

I want to set a particular cell to be 20% wide.  I am using .NET MVC libraries.

My code reads as follows 

using CellWidth = Telerik.Windows.Documents.Flow.Model.Styles;

.
.
.

                detailsLine = table.Rows.AddTableRow();
                detailsCell = detailsLine.Cells.AddTableCell();
                detailsCell.PreferredWidth = new CellWidth.TableWidthUnit(CellWidth.TableWidthUnitType.Percent, 20.0);

I have an error:

CS0029: Cannot implicitly convert type 'Telerik.Windows.Documnets.Flow.Model.Styles.TableWidthUnit' to 'double?'

 

What can I do.

Charles
Top achievements
Rank 1
 asked on 02 Jun 2022
1 answer
192 views

Hi Telerik team,

I try to add an image to my document using the following lines:

var imageInline = result.Runs.First().Paragraph.Inlines.AddImageInline();
imageInline.Image.LockAspectRatio = true;

After exporting the document to word the setting doesn't have any effect. The checkbox in word for locking the aspect ratio isn't checked.

 

Is there something I am missing?

 

Dimitar
Telerik team
 answered on 01 Jun 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?