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);
}
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
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.
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
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
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)
I want to import pdf document to a RadFlowWordDocument in the current Run from code.
Is it possible? I have imported pdf using RadEditor.
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;