web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Encodian HTML to PDF: ...
Power Automate
Unanswered

Encodian HTML to PDF: CSS to Create a Four Photo Grid on Letter Size Page

(0) ShareShare
ReportReport
Posted on by

I am trying to build a single page letter size photo grid similar to the example below using Encodian's HTML to PDF conversion action. My knowledge of HTML & CSS is limited. 

 

Any help would be appreciated.

 

In Edge my code produces this, which is exactly what I'm looking for.

Edge Browser ResultsEdge Browser Results

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Power Automate - Encodian Action Results:

Power Automate ResultsPower Automate Results

 

My Code:

<!DOCTYPE html>
<html>
	 <head><meta http-equiv="content-type" content="text/html; charset=utf-8"/></head>
	 <style>
		 
* {
			box-sizing: border-box;
			margin: 0;
			padding: 1px;
	 	}
		 
	 	body {
			background-color: white;
			padding: 5px;
			font-family: Arial;
	 	}
	 	
	 	hr {
			color: #1F3864;
	 	}
	 	
	 	h2 {
			font-size: 20px;
			color: #1F3864;
	 	}
	 	
	 	h3 {
		 	font-size: 16px;
		 	color: #1F3864;
		}
		 
		.row {
		 display: flex;
		 flex-wrap: wrap;
		 padding: 5px;
		}
		
		/* Create four equal columns that sits next to each other */
		.column {
		 flex: 25%;
		 max-width: 25%;
		 padding: 2.5px;
		}
		
		.column img {
		 margin-top: 0px;
		 vertical-align: middle;
		 width: 100%;
		}
		 
	 	/* Content */
	 	.content {
			background-color: ghostwhite;
			width: 100%;
			padding: 5px;
	 	}
		 
		 /* Responsive layout - makes a two column-layout instead of four columns */
		 @media screen {
			.column {
			 flex: 50%;
			 max-width: 100%;
			}
		 }
			
	 }
	 
	 </style>
	 
	 
<!-- Main progress photo gallery -->
	<div class="main">
	
	<h2>Progress Photos</h2>
	<hr>
	
	<!-- Portfolio Gallery Grid -->
	<div class="row">
	 <div class="column">
		<div class="content">
		 <img src="/Users/bradich/Desktop/Monthly Project Report Test Files/IMG_0306.jpg"/>
		 <h3>Photo 1 Description</h3>
		</div>
	 </div>
	 <div class="column">
		<div class="content">
		 <img src="/Users/bradich/Desktop/Monthly Project Report Test Files/IMG_0304.jpg"/>
		 <h3>Photo 2 Description</h3>
		</div>
	 </div>
	 <div class="column">
		<div class="content">
		 <img src="/Users/bradich/Desktop/Monthly Project Report Test Files/Photo 3.jpg" max-width="100%"/>
		 <h3>Photo 3 Description long text test. This is a very long description. How does it appear on the grid?</h3>
		</div>
	 </div>
	 <div class="column">
		<div class="content">
		 <img src="/Users/bradich/Desktop/Monthly Project Report Test Files/Photo 4.jpg"/>
		 <h3>Photo 4 Description</h3>
		</div>
	 </div>
	</div>
	
	<!-- END gallery -->
	</div>
</html>

 

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard