How to handle SVG in SAP UI5 Semantic Rendering - sapui5

I'm trying to convert my SAP UI5 Renderer code to the new version, apiVersion : 2.
I've been able to convert most of my code, but there's a code fragment having SVG in it which I'm not sure how to convert. At the moment, the entire fragment is handled using the "write" method.
I have tried to convert the generic "write" method into a series of openStart("svg"), attr("xmlns", ..) statements, but I'm not sure how to handle statements like write("<path d='...' class='") and so on.
Is there any documentation/blogs/information about how I can handle SVG in the new SAP UI5 Renderer, apiVersion : 2?
Any guidance would be really appreciated!
Thanks & Best Regards,
Shameek

Related

How to get Delta from a row HTML string in flutter_quill?

Hallow! I need to insert HTML from server to flutter_quill editor, but how to do it? Maybe is it unable thing... Thanks for any answers!
I can make a new document from Delta or from JSON only
As far as I know flutter_quill don't support the html data types. I think it can provide data in delta, plain text & json formats only.
But you can use quill_html_editor library to use the html together with quill editor in flutter. The usage is almost like flutter_quill with more focus on html type content.
To set the html content to editor you just have to set the html string in the controller
await controller.setText(text);
Give it a try. May be it can fulfil your need.

VS Code Completion for custom HTML elements

Is there a way to add custom HTML elements with custom attributes to VS Code so that I will get some autocomplete / intellisense on it?
For example in my framework (here Aurelia) I have added a <my-component is-telling-lies="true" aria-type="hidden" default-target="north">Do you believe?</my-component> and would like to have the element show up when starting to type a new element and inside it the attribute when typing in the attribute space of the element.
Yes, there's a way.
You can extend VS Code's HTML support through a declarative custom data format. By setting html.customData to a list of JSON files following the custom data format, you can enhance VS Code's understanding of new HTML tags, attributes and attribute values. VS Code will then offer language support such as completion & hover information for the provided tags, attributes and attribute values.
See: https://code.visualstudio.com/docs/languages/html#_html-custom-data
You can read more about using custom data in the vscode-custom-data repository.

Dynamic HTML with Foundation and React

I'm trying to use Foundation with React, but I'm experiencing some problems regarding dynamic creation of interactive content.
Here is some coffee script code which shall create a data-dropdown but I think the problem is more general so that it's independent of the code.
render : ->
a href : '#', "data-dropdown" : 'drop',
'Dropdown link text'
div id : "drop", "data-dropdown-content" : true, className : "f-dropdown content",
p 'Dropdown content text'
Normally, one could call the Foundation function on dynamically created HTML nodes, but I don't think that this harmonizes with the spirit of React.
Is there a best practice for this case? Or should I switch to React-Bootstrap?
I also tried to invoke the foundation method on the DOM nodes, but beside the fact that it doesn't work, it would be plain ugly.
You're probably not going to want to use foundation or bootstrap javascript in your reactjs code. It usually doesn't work at all. Moving to react-bootstrap like you have is probably the way to go,
http://react-bootstrap.github.io/
Here's a pretty awesome react resource to help find other react components if you need something specific,
http://react-components.com/

How to change the SSRS input parameters position in report

My SSRS report contains 7 input parameters and while running my report the size of the parameter(i.e. length) is increasing.
One of my input parameter(drop down list) may contain 100 characters so the size is not constant but i want to place all parameters in 2 lines or 3 lines(in a row).
Now it is coming 2 parameters per a row
Please advice
As gbn indicates, it's not easy to change the built in report server method of presenting the parameters. SSRS likes to always use two parameters per line, presented in the order that they exist in the report (which must match the dependency order.)
So the alternatives that gbn mentions: Both involve building a "Wrapper" application: some custom code or a web page that you can code however you like to get the parameters. Then you call Reporting Services, either in code or by passing a formatted URL with your parameters. The report can be displayed in a frame, new window, or passed as a stream to where ever you'd like.
The URL access is pretty straightforward and reliable: I often use it either by hand (to create "favorites") or in code.
http://msdn.microsoft.com/en-us/library/ms153586.aspx
For what you are looking for, these might be more work than you expected, but they will be extremely flexible for your interface.
Jamie
You can certainly do that, just right click on the RDL file in the solution explorer and select view code. then move the XML tags named <ReportParameter Name="Nameofparameter"> under <ReportParameters> according to where ever you want to position. And then save it. thats it!!!
The report parameters are kind of floating in values of 2, so if u have 4 report parameters then it will be shown as 1,2 next line 3,4. Best of luck!!
Use ASP.NET for the paramaters and a ReportViewer control or URL access to render. Seriously.
I don't know of any option to present parameters any way other then the default
I believe you could try using jQuery. The report parameters are rendered in a table under a div tag with class sqlrv-ParameterContainer. Write a jQuery or JavaScript function that will extract the full innerHTML from this div ie. the table content and then extract the table row information like the <label> or <input> tags.
Create your desired table structure with <table><tr><td>{extracted sections}</td><td></td></tr></table> or leave it to your requirement...
Then just append this new HTML structure in place of the original default structure.
In jQuery it will be like
$(".sqlrv-ParameterContainer").html();
which will give you the entire table structure that comes inside the parameter. Use XML parsing and get the input controls and all. Extract these controls as-is, don't change anything.
$(".sqlrv-ParameterContainer table").remove(); // it will remove the SSRS rendered default table from DOM
$(".sqlrv-ParameterContainer table").appendChild('<table><tr>......</tr></table>'); // Append your custom html structure here....
This was something that came to my mind quickly... I would suggest you test it... :)
This doesn't help the OP with SSRS-2008 but in case it helps others - Microsoft have improved this in SSRS 2016 - parameters can now be easily managed via the GUI in Report Builder / Visual studio:
https://www.intertech.com/ssrs-parameters-2016-update/

Making a PDF output in raster format instead of vector using itextsharp

I have written C# code to save product specifications to a PDF document using iTextSharp, mainly with PdfPTable and Chunks/Paragraphs in the PdfPCells. However, I have been told that the output is unacceptable due to the fact that you can highlight and copy the text from the document and document storage and retrieval server software that they are currently using does not support "Vector" based PDFs. I'm not exactly certain what the difference is between a raster pdf and and vector pdf. Basically, every page of the PDF Document should be an image so that the text can not be highlighted. Is there any way to do this without using the DirectContent? Below is an image, illustrating a portion of the PDF that was created, and how the text can be selected and copied, which is the incorrect functionality.
I would like to avoid directly writing to the canvas, unless there is a way to do this and still have itextsharp handle my formatting and proper paging.
The windows application PDF2R works well, but doesn't seem to offer any programmatic solutions. I have found libraries that stated that they do this sort of conversion, but are several thousand dollars. I'd like to work within my budget and use the itextsharp or something much cheaper than this.
I would suggest you try to generate an image using the System.Drawing class and then insert that into the PDF document.
Call this code on your PdfWriter object:
writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
This won't prevent users from selecting text, but it will prevent them from copying and pasting it. Give it a try.