I`m using RazorPDF from the NuGet Package and i want to know how i can set the page to render as landscape.
The code of the page is something like this:
<itext pagesize="A4">
..... some content .....
</itext>
Add this attribute
orientation="landscape"
Related
I have installed Bootstrap icon like this link: https://icons.getbootstrap.com/#install
This is how I import the link and create the CSS file for Bootstrap Icon:
But then it still doesn't work. I still can't use the icon:
Did I do something wrong? Hope someone can explain this to me clearly because I am new to ASP.NET Core 6 and am still learning.
Thank you very much.
Here is a working demo:
Try to add the css into Views/Shared/_Layout.cshtml,or you can add it into the view you want to use the icons:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons#1.9.1/font/bootstrap-icons.css">
And then use the icons like this:
<i class="bi bi-train-front-fill"></i>
Then the result will be:
If you want a local Bootstrap Icon installation. Are the SVG files also available locally?
The Bootstrap icons are based on SVG files see link
https://getbootstrap.com/docs/5.2/extend/icons/#bootstrap-icons
"...While most icon sets include multiple file formats, we prefer SVG implementations for their improved accessibility and vector support..."
Therefore, the SVG files (over 1900) must be in the appropriate directory.
These can be downloaded via the ZIP file link
https://github.com/twbs/icons/releases/tag/v1.10.2
When I create custom widgets of elementor with owl-carousel. after when i use it in full width. then it create left site. not middle.
Take a look at your js init. is there something like "margin: 25" ? delete it. otherwise, I guess, it could be css. do you have a testing link?
I am developing a custom widget on a new Sitefinity 12.2 instance. When I define some public properties on my controller as described here, my widget designer works as expected. Clicking the edit button on an instance of my widget opens up a full page editor where I can edit my properties.
However, when I define my own widget designer view (following this documentation), the result when I click the edit button is a modal that appears outside of the window above and to the left. Inspecting the element and adjusting the styles through the browser console, I am able to move the modal onscreen where it should be. The css source for the modal's position is [myDomain]/Frontend-Assembly/Telerik.Sitefinity.Frontend/assets/dist/css/sitefinity-backend.min.css?package=[myProject], which seems to be coming from Sitefinity's default code.
My questions: Is it possible for my default designer views to use the full screen editor that the auto-generated designer uses? If not, what am I doing wrong that's causing my modal to render offscreen? Surely that's not out-of-the-box behavior?
DesignerView.Default.cshtml:
<div class="form-group">
<label>This is a custom designer view</label>
</div>
DesignerView.Default.json:
{
"priority": 1
}
Turns out our custom CSS included its own definition for a .modal CSS class, which was interfering with the Bootstrap CSS class with the same name used by Sitefinity. This style was the culprit:
transform: translateY(-50%);
Removing/renaming our custom class has fixed the issue of the designer modal loading offscreen. I'd still be interested to hear if anyone has an answer for this question though: Is it possible for my default designer views to use the full screen editor that the auto-generated designer uses?
How can I add custom header and footer text in tcpdf using laravel controller
Following the TCPDF doc I can create a pdf file fine. but when I want to add custom footer text I didn't do that.
This is the Controller.
How can I add custom footer in tcpdf or you have any solution for the custom footer any other package which I will use custom footer easily please suggest me.
I fixed my problem using mPdf instead of tcpdf. Using mPdf I just called SetFooter() function.
$mpdf = new mPDF();
$mpdf->Bookmark('Start of the document');
$mpdf->WriteHTML('<div>This is body text </div>');
$mpdf->SetFooter('<div>This is custom footer!</div>');
$mpdf->Output();
Now custom footer worked for me!
I'm using the ACF gallery field to add images into a custom post type. The problem is that in the case of one post I've added around 80 images which means that they all have to load before Masonry is triggered. I thought I'd use lazy load to load the images in as you scroll down the page but that requires for you to know the image dimensions.
I found this https://github.com/okadots/masonry-wp-lazy-load but it turns out that it isn't very secure.
Anybody have any other ideas?
You can use something like imagesLoaded (which is made by the creator of Masonry) to make sure all images are loaded before triggering Masonry.
imagesLoaded in Masonry documentation: http://masonry.desandro.com/appendix.html#imagesloaded
You can use the imagesLoaded plugin, found here: http://imagesloaded.desandro.com/ then each time an image gets loaded you can refresh the layout of the grid, it will look like this:
// init Masonry
var $grid = $('.grid').masonry({
// options...
});
// layout Masonry after each image loads
$grid.imagesLoaded().progress( function() {
$grid.masonry('layout');
});
each time you add more items to the grid, probably via AJAX, you'll need to execute the lines where you layout masonry
if you are having a hard time with this you can use a plugin ready to use, like this one: https://codecanyon.net/item/media-boxes-portfolio-responsive-grid/5683020 with this plugin you can have lazy load, you only specify the URLS of your images and the plugin will do the rest, you can configure how many images you want to load on each set