Quantcast
Channel: Telerik Forums RSS
Viewing all 94857 articles
Browse latest View live

Very high memory consumption while exporting RadFixedDocument with images to PDF

$
0
0
Hello Mike,

When you add multiple images as pages they are preserved in memory until the RadFixedDocument instance is exported to PDF. This explains the high memory consumption. With the latest version of RadPdfProcessing, we have introduced a new approach for processing PDF files allowing you to write pages directly to PDF FileStream without the need of keeping the pages in memory through RadFixedDocument model. You may learn about this new functionality in this blog post, this documentation article and this SDK example. You may also take a look at the following code snippet showing how to modify your first code snippet so that it uses the new PdfStreamWriter class:
using (PdfStreamWriter fileWriter = new PdfStreamWriter(stream))
{
    RadBitmap bitmap = new RadBitmap(controlToExport);
 
    for (int i = 0; i < 50; i++)
    {
        RadFixedPage page = new RadFixedPage();
        page.Size = new Size(bitmap.Width, bitmap.Height);

        FixedContentEditor editor = new FixedContentEditor(page);
        editor.DrawImage(new ImageSource(bitmap.Bitmap));
 
        fileWriter.WritePage(page);
    }
}

Additionally, if you need to optimize the memory consumption, make sure that the "stream" variable is a FileStream instance (created from SaveFileDialog in Silverlight), as this way you will write the PDF file directly to disk without consuming unnecessary memory.

I hope this if helpful.

Regards,
Deyan
Telerik by Progress


How to create a Word Document from a Word Template (.dotx) via .NET Console Application

$
0
0
Hi Todd,

The MS Word template files (DOTX) are not supported in RadWordsProcessing. We have already logged a feature request and you can submit your vote for its implementation as well as track its progress through the related public item.

I am not sure how it will fit your requirements but you can check the Mail Merge functionality of RadWordsProcessing. It allows you to create a document containing merge fields and populate them with different data. There is an example of this functionality in the XAML SDK repository which may help you get a better understanding of the feature.

Hope this information is helpful.

Regards,
Tanya
Telerik by Progress

No gridlines in Excel 2013

$
0
0
Hello Neils,

Thank you for contacting us.

As you may see on this link to the SDK example the normal style of the workbook is modified as a solid fill is applied to it. This way the default style of the cells will have this fill applied. As the fills layer is above the gridlines layer this results in hiding the gridlines.

If you want to have both cell background and border lines you can set some borders to the normal style. As the borders layer is above the fills layer the borders will be visible above the fills. The following code snippet shows how you can achieve that:
CellBorder border = new CellBorder(CellBorderStyle.Thin, new ThemableColor(ThemeColorType.Text2));
normalStyle.RightBorder = border;
normalStyle.TopBorder = border;
normalStyle.LeftBorder = border;
normalStyle.BottomBorder = border;

As for the AutoFitWidth issue - this issue is fixed in the current version of RadSpreadProcessing. If you upgrade to the latest SP version the AutoFitWidth method should be working as expected.

I hope this is helpful. If you have any other questions or concerns please do not hesitate to contact us again.

Regards,
Deyan
the Telerik team
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 

Filter on JSON contents?

$
0
0
Hello,

Sorry for the late reply. Yes, it is possible to filter requests based on the contents of JSON with FiddlerScript.

Here is a link about how FiddlerScript works. You can modify the OnBeforeRequest function in your script in order to add a "ui-hide" Session Flag to all sessions of requests you are not interested in. Here is a link to some more session flags and what they do. And here is a link explaining how to modify requests and responses in case you need to do so.

Regards,

Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

Date Time Header Context Filter Menu Error

$
0
0

I have a grid which use Header Context Menu. Filtering option is not working with DateTime Fields

 

<telerik:RadGrid RenderMode="Lightweight" ID="itinerariosGrid" runat="server" AutoGenerateColumns="False" EnableEmbeddedSkins="false" Skin="telerikbootstrap"
                    AllowFilteringByColumn="True" AllowSorting="True" AllowPaging="True" Culture="es-MX" FilterType="HeaderContext" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true"
                    AllowMultiRowSelection="True" AllowAutomaticUpdates="False" AllowAutomaticInserts="False" OnItemDataBound="itinerariosGrid_ItemDataBound"
                    OnNeedDataSource="itinerariosGrid_NeedDataSource" AllowAutomaticDeletes="false" EnableLinqExpressions="false"            
                    OnInsertCommand="itinerariosGrid_InsertCommand" OnUpdateCommand="itinerariosGrid_UpdateCommand" OnDeleteCommand="itinerariosGrid_DeleteCommand">

Can't extract websocket payload from binary to ascii

$
0
0

I use

static functionOnWebSocketMessage(oMsg: WebSocketMessage)
{
FiddlerApplication.Log.LogString(oMsg);
}

for displaying websocket message at Fiddler the log tab. As you see the payload is in binary or encoded and Chrome developer tool is capable to display it in JSON format. Tried also with https://www.websocket.org/echo.html and this site payload was nice and readable. Can anyone tell me what should I do to get payload in FiddlerScript in JSON format as Chrome Developer tool shows.

ListView binding to ObservableCollection does not update GUI

$
0
0
I'm also seeing this issue with the radlist but not seeing the issue with a regular listview accessing the same collection.  I'm using an observablecollection that has elements added to it when on the screen load (i'm not creating the collection at that time, as I understand that creating the object will mess up the onchanged event from firing).  I'm using v2017.2.626.3.  

Point Color

$
0
0
Is there a way to have a different colors for different point on a single line for TKChartLineSeries?

Change speed of radial gauge dial

$
0
0

Thanks - as noted not the end of the world. I would suggest (hope!!!) that you add/include the speed (animation) setting as a tag and thus include it in the property sheet for future releases. This not only allows easy setting, but MORE valuable is the "discovery" of the feature - it becomes rather "self documenting" by a simple look at the property sheet in the asp.net designer.

At the end of the day, rather thrilled with the gauge. I am pulling some values from SQL server, and the ease of setting the values on a web page with a wee tiny bit of .net code makes me look like a magician.

Could not be more impressed with what you folks done with these controls - really nice!

Again, thanks kindly,

Albert

 

PDF Image Quality

$
0
0
Hello,

Thank you for contacting us.

To see how to position and draw image with size different than its original size you may take a look at this FixedContentEditor Positioning code snippet. For more information about adding images to PDF and how to work with ImageQuality you may take a look at these ImageSource and ImageQuality documentation articles. Additionally, for better understanding of ImageQuality in RadPdfProcessing you may take a look at this CreateDocumentWithImages SDK example.

I hope this is helpful. If you have any other questions or concerns please do not hesitate to contact us again.

Regards,
Deyan
the Telerik team

Size of PDF document

$
0
0
Hello Neven,

Thank you for contacting us.

As mentioned in this fonts documentation section all fonts that are not one of the standard PDF fonts should be embedded. If the font is not embedded the result of opening the PDF on different devices is unpredictable and this not recommended due to PDF format specification. That is the reason why RadPdfProcessing embeds all non-standart fonts used in the document. 

As RadPdfProcessing default font is Helvetica, which is one of the standard fonts, this font is not embedded which explains why exporting "hello world" document with RadPdfProcessing results in much smaller size. However, if you change the font in RadPdfProcessing to "Calibri", the size of the document will be the same as in RadWordsProcessing as RadWordsProcessing uses RadPdfProcessing for its PDF export. Although this difference in document size may seem huge for a "hello world" document, in real world scenario when the document has more text content the size of the embedded font is much smaller compared to the size of the PDF content. Additionally I would like to mention that as an optimization RadPdfProcessing does not embed the whole font but instead embeds only the font subset of the used characters which guarantees minimum font size.

As for the images - RadPdfProcessing inserts the image in the PDF with the same resolution as the referenced image. Using the ImageQuality enumeration you can control the quality of the image and this way reduce the size using lower quality. You may try this SDK demo to see how the different image quality results in different document size. However, there is one additional suggestion I would like to mention when talking about reducing the PDF size. If an image is rendered with size 500x500 in the PDF page then you may consider adding the image with similar size to the document. This means that if your original image is for instance 2000x2000 then you may preprocess it to become 500x500 and then add it to the corresponding RadFlowDocument or RadFixedDocument instance. Even exporting to PDF with ImageQuality.High, this preprocessing will reduce the image size in the document about 4 times and still the image will be rendered with maximum quality. I am attaching a demo project showing how you can resize images using only .Net Framework. A few words about this demo:
  • It is a console application.
  • It opens BigImage.jpg file that is about 1.2 MB with resolution 2313x2311.
  • ResizeImage method resizes the original image to 35 KB with resolution 693x693 and image quality 75. If you choose lower image quality value you can get even more impressive image size difference.
  • After the image is resized the application opens it, so that you can see the result with your default jpeg viewer.

When talking about performance - as mentioned in this "ImageQuality.High with JPEG and JPEG2000 images" documentation section, when using ImageQuality.High RadPdfProcessing reads only the image headers and when the image is JPEG it inserts it in the document without processing the whole image pixels. This not only guarantees best image quality but also guarantees maximum performace as processing big images may be a time consuming operation. So as a performance optimization I would suggest you to use ImageQuality.High when exporting to PDF. 

I hope this information is helpful. If you have any other questions or concerns please do not hesitate to contact us again.

Regards,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

New Features in 2015 Q2 missing?

$
0
0
Hello Shaun,

Thank you for contacting us.

I will follow the same numbering of your questions for the corresponding answers below:
  1. The issue related with images trasparancy requires implementation of image masks in RadPdfProcessing and we have not implemented this functionality yet. We have already created this feedback item which you can follow in order to be notified when its status is changed from "Approved" to "In Development" and "Completed". This is one of our high priority tasks and we will do our best to implement it for the next official release.
  2. Regarding the documents imported as blank - this behaviour may be caused by many different issues related to RadPdfProcessing import functionality. As you may see from the above mentioned release notes we are currently actively working on improving this import functionality. Our aim is to make RadPdfProcessing import feature equal to RadPdfViewer's import functionality. The completion of this task in some of the following official releases will allow successful import of a variety of different PDF documents. Meanwhile, when you encounter issues with our import I would ask you to send us the problematic documents if possible. This will allow us to test with bigger set of PDF files created by different PDF producers.
  3. Regarding the image quality issue - as may be seen from the release notes, we have made improvements our images import API in several ways. If you import PDF document with images we now taking the image data as is, without decoding and re-encoding it, which improves not only the performance but also preserves the image quality. If you generate a document and need to import an image in it you may take a look at the new ImageSource class constructors that allow you to specify the image quality. There is also a new constructor that takes EncodedImageData. This allows us to take the image stream as is without decoding and re-encoding it. Using this approach you may guarantee that the image quality of the imported image is preserved. For more information about this functionality you may take a look at this SDK example showing how to create PDF with JPEG and JPEG2000 images preserving the original images quality.

I hope this is helpful. If you have any other questions or concerns please do not hesitate to contact us again.

Regards,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

Possible to add UIElement?

$
0
0
Hello Jesper,

Thank you for contacting us.

When you want to export UI element to PDF you have several options. Two of them are listed below:
  1. The first option is to convert the UI element to image and add this image to the PDF page. This may be achieved using ExportExtensions.ExportToImage method. I am attaching a sample application that creates image from Telerik's Barcode UI element and then exports this barcode to PDF.
  2. The second option is to draw the UI Element using native PDF primitives (texts, geometries and images). You may see how this can be achieved by following this link to SDK example showing how you can export UI element to PDF.
I hope this information is helpful. If you have any other questions or concerns please do not hesitate to contact us again. 

Regards,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

Possible to add UIElement?

$
0
0
Hello Jesper,

About the first option - you can take snapshot of the UI element in its desired size (or bigger that this size) and then insert the image in the PDF using the DrawImage overload that allows you to specify the rendering size. This way the image will be rendered in the PdfViewer with the specified size using the source of the originally bigger image. This combined with the ImageQuality.High option in ImageSource constructor may help to achieve better quality when rendering the UIElement.

With the second option - we have tested this SDK example with relatively large variety of UIElements and in most cases everything is exported correctly. Basically, the example traverses the WPF visual tree and renders WPF primitives, so it is suitable for exporting different UI scenarios. If you experience any issues with some concrete example you may write to us again so that we can try solving the issue together.

I hope this helps.

Regards,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

[Silverlight] dash

$
0
0
Hello David Charles Ocasio,

The LIBs are usually released every week. The next LIB is expected at the beginning of the next week. 

As for the workaround - the only possible workaround is to register font different than the standard fonts in the fonts repository and use this font to draw the dashes. Due to Silverlight limitations you cannot access the system fonts, so you should either embed the font data in your application or access it via a web service. You may see this SpreadProcessing SDK example which uses this web service project to register all used PDF fonts before exporting the PDF file.

I hope this information is helpful. If you have other questions please contact us again.

Regards,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

Merge and save as PDF

$
0
0
Hi John,

The RadWordsProcessing library could help you achieve this goal. You could merge the records with your template through the Mail Merge functionality and export the generated document to PDF using the PdfFormatProvider. For the import of DOCX files you could take a look at the Using DocxFormatProvider article.

You may also find helpful to check the examples in our SDK repository.

Regards,
Tanya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

[Silverlight] Umlaute (ä ü ö) in PDF Export

$
0
0
Hello Jens,

Thank you for contacting us.

As mentioned in this RadPdfProcessing fonts documentation article all fonts that are not from the standard 14 fonts should be embedded in the PDF file. Due to Silverlight limitations we cannot access the system font files and cannot embed them by default in Silverlight. This causes the issue with the missing umlaut letters.

In order to workaround this issue there are two options: I am attaching a demo PDF file that contains correctly exported umlaut letters. This PDF file is exported by slightly modifying the worksheet content in the RadSpreadProcessing SDK example.

I hope this is helpful. If you have any other questions or concerns please do not hesitate to contact us again.

Regards,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

Add lines in table cell.

$
0
0
Hello Sandeep,

Thank you for contacting us.

You can add some geometry in table cells by first adding a Block in table cell and then insert the desired geometry as block's content. You may find more detailed information in the "Inserting Geometries" section of this Block documentation article. Using this approach you will be able to add a path geometry of one color.

If you need to add more complex geometry with multiple colors in table cell you will have to implement custom block element as shown in this IBlockElement forum post. In the Draw()method you should implement the logic for drawing the custom geometry using FixedContentEditor. You may find sample code for drawing geometries with FixedContentEditor in the DrawFunnelFigure() method on this link to PdfProcessing GenerateDocument SDK example

I hope this is helpful.

Regards,
Deyan
the Telerik team
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 

Display all panes

$
0
0

Hello,

Upon application launch I want to display all my RadPaneGroup like in the attached figure. 

Each group contains only one RadPane. 

I want that each RadPane will have Height\Width according to the user control it is holding. 

Is it possible ?

Thank you,

Zvika 

Incell editing, updated row goes to bottom of grid

$
0
0

I have a grid with incell editing. Everything works fine, the incell editing has a dropdown list. 

My problem is that once the row (cell) has been updated, it goes to the bottom of the grid. Any idea what might be causing that?

Viewing all 94857 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>