Telerik Forums
Telerik Document Processing Forum
0 answers
102 views

Hi 

I am using Telerik in my dot net core Project and its working fine but I need to host my application on an apache server, and when I run my application on the apache server I am getting Unable to find the package Telerik.Document.Fixed. No packages exist with this id in source so my question is Does Telerik work with the Apache server and what are the necessary changes that need to be done for that.
Bobindra
Top achievements
Rank 1
 asked on 19 Jan 2022
0 answers
114 views

Greetings,

any clue on why this is misbehaving on one environment but works fine on another? File exists on both boxes and path is valid.

Its basically adding a doc to a blank doc, however when it use in production will be more than one.

 

Throws exception Invalid URI - Hostname could not be parsed.

Dim MainDoc as New RadFixedDocument()

Dim childDoc as RadFixedDocument = LoadFile('c:\folder\sample.pdf')

MainDoc.Merge(childDoc) <--- error occurs here. the error is when it attempts to clone in the merge

 

Private Function LoadFile(byval strFilePath as String) as RadFixedDocument

      Dim pdfProvider as new PDFFormatProvider()

      Dim returnRad as RadFixedDocument

      Using input as FileStream = File.OpenRead(strFilePath)

             returnRad = pdfProvider.Import(input)

     End Using

     returnRad

End Function



 

 

Jerome
Top achievements
Rank 1
 updated question on 18 Jan 2022
1 answer
113 views

Hey, anyone knows how to set geometry borders?

Thanks

Svilen
Telerik team
 answered on 18 Jan 2022
1 answer
218 views

Hi.

I am attempting to create bookmark for several blocks on several pages, to create a Table of Content. Each page can contain more than one block. When reading your documents I have found this:

Location location = new Location();
location.Page = document.Pages.Last(); // The issue
location.Left = 10;
location.Top = 10;
BookmarkItem bookmark = new BookmarkItem(titleString, location);
bookmark.IsExpanded = true;
document.Bookmarks.Add(bookmark);

This works creating a ToC with the help of this method:

private static void ToC()
{
	RadFixedPage toc = new RadFixedPage();
	document.Pages.Insert(1, toc);

	FixedContentEditor editor = new FixedContentEditor(toc);
	int offSetVal = 0;

	foreach (BookmarkItem bookmark in document.Bookmarks)
	{
		int pageNumber = 1;

		if (pageNumber > 0)
		{
			int factor = 20;

			int offsetX = 70;
			int offsetY = offSetVal + 20 + factor * pageNumber;
			offSetVal += 10;
			editor.Position.Translate(offsetX, offsetY);

			Block block = new Block();
			block.InsertLineBreak();
			block.GraphicProperties.FillColor = new RgbColor(255, 5, 99, 193);
			block.InsertText(bookmark.Title);
			Size blockSize = block.Measure();
			editor.DrawBlock(block);


			var location = bookmark.Destination;
			GoToAction goToAction = new GoToAction();
			goToAction.Destination = location;

			Link uriLink = toc.Annotations.AddLink(goToAction);
			uriLink.Rect = new Rect(offsetX, offsetY, blockSize.Width, blockSize.Height);
		}
	}
}

The problem is that each action links to the same page. When debugging I can also see that "document.Pages.Last()" has the same value. How can I make it so the correct page is connected?

PS: Please let me know if any value is needed.

Thanks

-Steffen

Dimitar
Telerik team
 answered on 13 Jan 2022
1 answer
148 views

I want to be able to feed a table of data into the html importer, and have it figure out how many pages it needs to generate, but while doing that, have it add a page header to every page that the text from the table must always come under.

Is this possible or am I going to have to determine if the line i want to add for every html row can still fit on the page and if not, create a new page myself?

Dimitar
Telerik team
 answered on 11 Jan 2022
1 answer
607 views

In a huge pdf, some part of table is placed previous page and the rest is placed next page. I need to keep a table together in one page. 

I only find a way might work (but didn't work) TableRow CanSplit property. To achieve this, I created wrapper table 1 row, 1 cell and set row CanSplit property to false. Then, added actual table to wrapper table cell. But this doesn't work.

Is there any way to keep them together?

Edit 1 : Using RadFlowDocument to create document and PdfFormatProvider to export.

Tanya
Telerik team
 answered on 06 Jan 2022
1 answer
728 views
create a fixedReadonly doc by importing readonly pdf
create a fixedFillable doc by importing fillable pdf
fixedReadonly.Merge(fixedFillable) 

pdfformatprovider.export(fixedReadonly) throws the error below.
but vice versa works.
but i need the fixedReadonly pages and then the fixedFillable pages in the exported pdf.

any idea?
Remzy
Top achievements
Rank 1
 updated question on 27 Dec 2021
1 answer
516 views

Hi,

I'm developing a template creation application so users can create their own templates and such for mail merge purposes and I am wondering if there is any way to replace placeholders (for example "[order:id]") with merge fields using RadFlowDocumentEditor (replace text feature to be exact).

I already realized ReplaceText does not support FieldInfo and I know I can replace the placeholder with values from the database as well but I think there is probably a way to get actual templates from that.

Thanks in advance.

Dimitar
Telerik team
 answered on 14 Dec 2021
1 answer
294 views

  RadFixedDocument doc = new PdfFormatProvider().Import(System.IO.File.OpenRead(localPdfFile));

I am trying to load a Adobe signed PDF document , but is throwing error as "The input data is not a complete block"

 

System.Security.Cryptography.CryptographicException
  HResult=0x80131430
  Message=The input data is not a complete block.
  Source=System.Core
  StackTrace:
   at System.Security.Cryptography.CapiSymmetricAlgorithm.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
   at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at System.IO.Stream.Dispose()
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Encryption.StandardEncrypt.CalculateAesResult(Byte[] cipherTextCombined, Byte[] key)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Encryption.StandardEncrypt.Encrypt(StandardEncryptionContext context)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Encryption.StandardEncrypt.EncryptString(Int32 objectNo, Int32 generationNo, Byte[] data)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Encryption.StandardEncrypt.DecryptString(Int32 objectNo, Int32 generationNo, Byte[] data)

 

 

Martin
Telerik team
 answered on 13 Dec 2021
0 answers
118 views

I have a PDF with a number of text fields that have a number format. I am updating them with calculated values: 

     If PDFdocument.AcroForm.FormFields.Contains(row.Item("XMLField").ToString()) Then
         field = PDFdocument.AcroForm.FormFields.Item(row.Item("XMLField").ToString())

         Select Case field.FieldType
               Case FormFieldType.TextBox
                         ModifyTextBox(CType(field, TextBoxField), OutText)
               Case FormFieldType.CheckBox
                         Try
                              ModifyCheckBox(CType(field, CheckBoxField), New String() {row.Item("OutText").ToString()})
                         Catch
                         End Try
         End Select
     End If

When this executes the number format is over written and I see 1222777.00 instead of 1,222,777.00.

Is there a way to either not lose the number format or reset the number format for the PDF Text field.? 

To clarify before the ModifyTextBox command the TextField is formatted as follows:

 After the ModifyTextBox command the format tab is changed to None:

 

Lee
Top achievements
Rank 1
Iron
 updated question on 09 Dec 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?