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

How to set breaks in RadFlowDocument for PDF Export in Telerik UI

$
0
0

Hello,

 

I am attempting to export PDFs using Telerik with breaks for new pages. I start with HTML and convert it to a RadFlowDocument which I then export to a PDF. The whole process works well except for adding page breaks which do not display in the exported PDF.

 

I have tried a few methods on other posts such as adding an html tag for break points, manually cycling through paragraphs and adding breaks, and finally using the radflowdocumenteditor. Each method has not been able to add breakpoints correctly in the PDF on the export.

 

Can someone provide me with the correct ways to add page breaks in a RadFlowDocument to export using the PDFFormatProvider.

 

Here is snippets of code for each method I have tried.

 

Adding an html tag for page breaks:

<ItemTemplate>
                    <asp:Label ID="lblLetter" runat="server"></asp:Label>
                    <%If recordCount > 1 Then%>
                    <p style="page-break-after: always;">&nbsp;</p>
                    <%End If%>

</ItemTemplate>

Result: No breakpoint is displayed in designated area

 

Cycling through RadFlowDocument and manually adding page breaks:

Html code:

<ItemTemplate>
                    <asp:Label ID="lblLetter" runat="server"></asp:Label>
                    <%If recordCount > 1 Then%>
                    <p>[PAGEBREAK]</p>
                    <%End If%>
</ItemTemplate>

 

VB Code for picking up Paragraphs with[PAGEBREAK] keyword:

Dim document As RadFlowDocument = provider.Import(html)

For Each fieldCharacter In document.EnumerateChildrenOfType(Of Paragraph)().ToArray()
            For Each inline In fieldCharacter.Inlines.ToList()
                If ((TypeOf inline Is InlineBase)) AndAlso ((TryCast(inline, Run)) IsNot Nothing) AndAlso ((CType(inline, Run)).Text = "[PAGEBREAK]") Then
                    Dim index = fieldCharacter.Inlines.IndexOf(inline)
                    Dim breakPage = New Break(document)
                    breakPage.BreakType = BreakType.PageBreak
                    fieldCharacter.Inlines.Insert(Index, breakPage)
                    fieldCharacter.Inlines.RemoveAt(Index + 1)
                End If
            Next
        Next

 

Result: Using debugger, it is hitting the if statement for [PAGEBREAK] paragraphs correctly and assigning the page break, but the final export does not have any page breaks.

 

Using RadFlowDocumentEditor to add page breaks instead:

Html code:

<ItemTemplate>
                    <asp:Label ID="lblLetter" runat="server"></asp:Label>
                    <%If recordCount > 1 Then%>
                    <p>[PAGEBREAK]</p>
                    <%End If%>
</ItemTemplate>

VB Code for using editor:

Dim document As RadFlowDocument = provider.Import(html)

Dim editor As RadFlowDocumentEditor = New RadFlowDocumentEditor(document)

For Each fieldCharacter In document.EnumerateChildrenOfType(Of Paragraph)().ToArray()
            For Each inline In fieldCharacter.Inlines.ToList()
                If ((TypeOf inline Is InlineBase)) AndAlso ((TryCast(inline, Run)) IsNot Nothing) AndAlso ((CType(inline, Run)).Text = "[PAGEBREAK]") Then
                    editor.MoveToInlineEnd(inline)
                    editor.InsertBreak(BreakType.PageBreak)
                End If
            Next
        Next

Result: Really confused on this one. I get a page break at the beginning of the document and no where else. Do I need to specify the specific paragraph as well when moving the editor? When I check the values in the debugger, it does appear to be cycling through every paragraph correctly; including the [PAGEBREAK] paragraph.

 

Thank you for the assistance.

Regards,

Avery

 

 

 

 

 


telerik tool being used by both visual studio 2010 and 2012

$
0
0
I have a vb.net web 2010 application that I would like to convert to visual studio 2012 and add the Telerik tool.
Before I complete that step I will add the telerik.web.design, telerik.web.device.dection,telerik.web.ui, and the telerik.web.ui.skins tool as a reference  to the application and set the version to auto update. The references will be obtained
from C:\Program Files (x86)\Progress\Telerik UI for ASP.NET AJAX R2 2019\Bin40 files.
Now on the same computer,
I will convert the vb.net 2010 web form application to visual studio.2012 and obtain the files from: C:\Program Files (x86)\Progress\Telerik UI for ASP.NET AJAX R2 2019\Bin45 as a reference. Will I setup the references as 'Auto Update' or something else? If I set the version to something else, what would I set the version to?
Also can I have both the Telerik tool working on the same compiuter by using both Visual Studio 2010 and Visual Studio 2012 for the web form application? If so, are there any directions that I need to follow?

How to set breaks in RadFlowDocument for PDF Export in Telerik UI

$
0
0

Ah, I missed the code block option. Unfortunately, it appears that I am unable to edit it. However, I can add a new post with the code in code blocks if it is easier to read.

Regards,

Avery

Can't see the contents of HTTP Tunnel to port 443 (II)

$
0
0

I checked the emulator version, it was 5.1, so it should not be the reason you mentioned. I also checked the logs in fiddler, it sais: "SecureClientPipeDirect failed: System.Security.Authentication.AuthenticationException Fehler bei SSPI-Aufruf"

I checked with wireshark, it is not the server who is closing the connection. It is fiddler who is the first one sending the FIN|ACK packet to the server.

Here is the packet order (not complete, just the important ones), maybe it is interesting:

1. client->server: Client Hello

2. server->client: Server Hello, Change Cipher Spec, Encrypted Handshake Message

3. client->server: Change Cipher Spec, Encrypted Handshake Message

4. client->server: FIN,ACK

 

Meanwhile I will read the documents you have linked. Thanks!

Erroneous Horizontal Lines

$
0
0

I have sporadic small gaps between detail in my report (that appears as a horizontal line as the background is a diff color than the image in the panel)
its not on every line of detail, but about 1/2.
attached is my report design and a sample output of the detail section

I have tried fooling with anchoring, docking, making sure my report section is exactly the same height as the panel inside of it (the panel contains a non repeating image)

Thank you

-Colleen


Cursor Wait on RadButton Click

$
0
0

That works for me if I specify a control on the page like;

function OnClientClicking(sender, args) {
                  document.getElementById('<%=radButton1.ClientID%>').style.cursor = 'wait';
                            }

 

It works just for the radButton though.

Specifying Form1 generates an error for. I guess since Form1 is defined in the master page. What if the form is defined in the master page, how do you get it's ClientId so the wait cursor covers everything?

 

 

Render image (byte[]) on kendo templates from Model

$
0
0
I downloaded zip file from the last post and found no single view file.

Fiddler 5.0.20 cannot import pcap file from Wireshark

$
0
0

Thanks

hmm

but I can set display filter and see http traffic in wireshark, I just wanted to use fiddler as a nice display (I captured this data with a router: https://wiki.mikrotik.com/wiki/Ethereal/Wireshark

that mirrored a port an embedded device is connected to)

 

so is there still a way to import this data into fiddler so I can inspect http a bit easier?


Fiddler 5.0.20 cannot import pcap file from Wireshark

$
0
0

here: http://dxing.si/STB/Amino/Project%20Amino%20hack/STB_Power.pcapng

is an unfilter capture it has http in it and a bounch of other stuff too, maybe this could be imported with fiddler?

PartialView being rendered as text?

$
0
0

I have a partial view that contains a TabStrip and each that contains a grid. The view works, it's currently in a different page and I'd like to move it to a kendo window.

I've moved it to a kendo window and the window displays great.

Here's the code that generates my window (please note the variable names have been changed for this).

var window = $("#window").kendoWindow({
                content: {
                    url: "/Case/CaseDetail",
                    data: {
                        Daid: Daid,
                        CaseID: CaseID,
                        RecordID: RecordID,
                        CanUserView: cuv,
                        OffenseCount: OffenseCount,
                        CoDefendantCount: CoDefendantCount,
                        VWCount: VWCount,
                        InternalProcessCount: InternalProcessCount,
                        ChargeDispositionCount: ChargeDispositionCount,
                        SentenceCount: SentenceCount,
                        OtherCaseCount: OtherCaseCount
                    }
                },
                actions: [
                    "Pin",
                    "Minimize",
                    "Maximize",
                    "Close"
                ],
//                close: onClose
            });
 
            window.kendoWindow().data("kendoWindow").center().open()

 

The window appears and the tabs are visible, the content of the 1st tab is loaded via an AJAX call that is never executed (so no content) and none of the tabs are functional when I click on it.

When I look at the page source I can see that the window was rendered as text and all associated javascript is actual text and not, all the scripts related seem to be escaped, here's an example of some rendered content:

<scripttype="text/javascript">
    function ProcessErrorO(args) {
        ProcessError(args, 'O_grid_' + '#= RecordID #');
    }
<\/script>

 

Any help would be appreciated.

Thanks

Filter always on every loading page?

$
0
0
Thanks a LOT Tsvetomir.  It's works #1!

Chart with multiple, grouped category axes

$
0
0

Hi Tsvetomir,

Thank you for your prompt reply and info about the grouped bar chart.

You mentioned that we can achieve the labels as in the Hughes's screenshot above, by enabling the labels of the series. How can we position the labels below the x-axis, exactly like the one in Hughes's screenshot? As far as I know, series labels can only be positioned as per described here:

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/series.labels.position 

I've tried padding as well but I'm not able to have it shown below the x-axis.

example

 

Thank you!

jQuery Plugin Method enabled/disabled binding

$
0
0
How does one establish an enabled or disabled binding to a dropdownlist initialized via the jQuery Plugin Method rather than MVVM?

how to RadHtmlChart export without use RadClientExportManager

$
0
0

Dear ,

 

I use RadHtmlChart for create chart but I have problem cannot export image/pdf

because this my telerik version not have tool RadClientExportManager.

 

Please introduce me for solve this problem.

 

Thank you very much.

Rad chart show x label not full

$
0
0

Thank you very much Vessy

Now I can run normal.


text box control icon

$
0
0

I see this is an old post, but it solves an design spec. I have.

in this example, how do you set focus to the textbox, such that the cursor is in the first position of the enter-able text area? 

The following places the cursor left of the image, and clearly isn't correct:

            txtUserName.TextBoxElement.Focus()

Show and hide button in grid using vue js

$
0
0

Hi All,

         How can we create , show , hide button in grid using vue js

jump to page in winform

$
0
0

Hi Admin,

 

After RadPdfViewer1.LoadDocument , I want to default focus to page no 6. May I know how to do in winform.

 

Thanks

Moe

Telerik Posting Questions

$
0
0

"An error has occurred while processing GroupSection 'groupFooterSection1':
The expression contains object 'PageNumber' that is not defined in the current context." 

Any one please give me a suggestion, please 

jump to page in winform

$
0
0

Hello, Moe,  

In order to navigate to a specific page, you can use the PdfViewerElement.GoToPage method passing the index of the page that you want to make current:

publicRadForm1()
        {
            InitializeComponent();this.radPdfViewer1.LoadDocument(filePath);this.radPdfViewer1.DocumentLoaded += radPdfViewer1_DocumentLoaded;
        }privatevoidradPdfViewer1_DocumentLoaded(object sender, EventArgs e)
        {int pageIndex = 4;this.radPdfViewer1.PdfViewerElement.GoToPage(pageIndex);
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.
Viewing all 78072 articles
Browse latest View live


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