Telerik Forums
Telerik Document Processing Forum
0 answers
38 views
Hello! I'm currently attempting to transform an HTML body into a PDF using HtmlFormatProvider, RadFlowDocument, and PdfFormatProvider.

Everything functions good when generating a PDF with standard characters. However, when incorporating characters such as "ćšđž," these specific characters seem to be missing.

Could you kindly provide guidance on resolving this issue?
Sanja Tolo
Top achievements
Rank 1
Iron
Iron
 asked on 09 Feb 2024
1 answer
38 views

I'm trying to convert a word document to PDF and the images and shapes it contains, along with their text, do not make it into the PDF. Are these not yet supported? 

The attached zip contains the original document and the result of the conversion.

The conversion code is pretty straightforward, basically just

DocxFormatProvider docxProvider = new DocxFormatProvider();
var pdfProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
RadFlowDocument document = null;

using (Stream input = File.OpenRead("WordDocWithGraphics.docx"))
{
    document = docxProvider.Import(input);
}

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

Yoan
Telerik team
 answered on 18 Dec 2023
1 answer
55 views

Hi,

I get HTML in my code and I have the image byte in another file. I want to combine it to export my HTML to PDF with images. This is what I do, and it only works with a single image, on the second iteration I got an error in importSettings.LoadImageFromUri (Method = <Internal Error evaluating expression>). What can I do to add multiple images in the importSettings? I don't see an example in the documentation.


foreach (var img in imageList)
{               
  EventHandler<LoadImageFromUriEventArgs> loadImageFromUri = (s, e) =>
  {
    
    byte[] data = img.ContentBytes;
    e.SetImageInfo(data, "jpg");
  };

  importSettings.LoadImageFromUri += loadImageFromUri;                          
}

Thanks

Martin
Telerik team
 answered on 03 Oct 2023
1 answer
32 views

Hi - I'm trying to open accessible Word document (with stuff like tags, alternative text on images, etc.), but when I'm saving in to PDF all of that is gone. Looking at this: https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/howto/comply-with-pdfa-standard I've tried to set `ComplianceLevel` but nothing has changed, pdf is inaccessbile. Should I set something additional? Is this supported?

Version I'm using is: 2023.1.104, platform is .NET 7

I've attached the code that I'm running and the template that I'm working on.

Dimitar
Telerik team
 answered on 26 May 2023
2 answers
52 views

Hi all,

 

I need to create some profile cards on a document based on the style template attached here. At the end of the process, the document should be exported in pdf.

I have tried a lot of things with RadWordsProcessing and RadPdfProcessing but I'm not sure I would be able to obtain the exact same result because of style limitations like rounded corners unavailable, for example.

Does anybody have any idea how I could create something the most similar possible? With any Telerik Document Processing tool.

I also tried to make a table (structured as in attached picture) but I didn't succeed to create the table with a colored background or image background (on all the table) and with the profile picture which should be place in a circle shape, ahead the table background. 

As I'm new to Telerik, my knowledge is limited, but I didn't find any information that helps me.  On the contrary, I only found information that make me doubt about the feasibility of this project.

 

Any help would really be appreciated,

Thank you in advance,

Adrian

 

Adrian
Top achievements
Rank 1
Iron
 answered on 15 May 2023
1 answer
93 views

Hi,

I have some issues converting doc or docx files to pdf.

Attachment has the code sample and 2 documents.

Problem_with_footer.docx after transformation does not render bold chars and does not display footer at all..

Changes_Signature_position.doc after transformation the position of Signature place is not correct.

 

Any  help would be appreciated

Thanks

John

Yoan
Telerik team
 answered on 04 May 2023
1 answer
106 views
It should have the following features using latest version of the documentation:
1)The ability to set margins should be available.
2)The ability to export PDF files should be available.
3)I'd like to incorporate html content in various blocks, as well as one logo and signature.
Yoan
Telerik team
 answered on 07 Mar 2023
1 answer
163 views

Hi there,

I am using the trial version at the moment to see if Telerik's document processing can replace another library we are currently using.

Here is our scenario,

We have a Word template document that has merge fields already setup and tables with borders already setup. This word template is read from a database table column into a memory stream and then we use the DocxFormatProvider to import the document to the RadFlowDocument. Below you can see a piece of the template document already setup.

When using EnumerateChildrenOfType<Table>().ElementAt(1) for example I can see that the table is selected and I can see that the border values have been picked up from the word template document. Below inspecting object for the table selected from the template document.

We then perform our mail merge and then use PdfFormatProvider to convert the merge result into a PDF document. The result is that the mail merge fields are merged correctly but all the tables have lost there borders that the original word template document had.

I have tried to after using EnumerateChildrenOfType<Table>().ElementAt(1)  to set the border again manually with new TableBorders(new Border(2, Telerik.Windows.Documents.Flow.Model.Styles.BorderStyle.Dotted, new ThemableColor(Colors.Black))); This also does not work.

Here is the PDF result produced, any suggestions would be appreciated. (Also a note, even if I take out mail merge in the process, the document converting straight from Word Template to PDF still produces the tables with no borders...)

Another note when I use your demo link and load my template and export to PDF the borders are also missing. (Telerik Export to PDF)

Vladislav
Telerik team
 answered on 23 Jan 2023
3 answers
190 views

I want to import pdf document to a RadFlowWordDocument in the current Run from code.

Is it possible? I have imported pdf using RadEditor.

 

Maria
Telerik team
 answered on 05 Jan 2023
1 answer
82 views

When I convert a document from .docx to .PDF, the footer disappears.  There are a couple checkboxes in the docx that disappear as well.  Does this library support these things?  Is there something specific I have to do to make them work?

 

My code:


                RadFlowDocument document;

                Telerik.Documents.ImageUtils.ImagePropertiesResolver defaultImagePropertiesResolver = new Telerik.Documents.ImageUtils.ImagePropertiesResolver();
                Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.ImagePropertiesResolver = defaultImagePropertiesResolver;

                using (FileStream input = new FileStream("file.bin", FileMode.Create, System.IO.FileAccess.ReadWrite))
                {
                    input.Write(doc.Content, 0, doc.Content.Count());

                    DocxFormatProvider provider = new DocxFormatProvider();
                    document = provider.Import(input);

                    //insert the data
                    RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document);

                    foreach (var item in templateValues)
                    {
                        editor.ReplaceText(item.Key, item.Value);
                    }

                    //change the value in the footer
                    editor.ReplaceText("[Document Revised Date]", doc.lastModified.ToShortDateString());

                    PdfFormatProvider pdfProvider = new PdfFormatProvider();
                    var result = pdfProvider.Export(document);

                    return result;

Peshito
Telerik team
 answered on 10 Nov 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?