Guys i tried set a two images in my template (size medium). Follow my code…
<<If: ISNOTBLANK([6.1 Visão panorâmica.])>>
<<[Nome do segurado]>> - <<[Número do sinistro]>>
ITEM <<[a) Item ou gleba]>>
|
<<[6.1 Visão panorâmica.]>>
Figura 1. Visão panorâmica.
<<If: ([192. Mostrar as coordenadas obtidas pelo AppSheet na legenda das fotos do relatório fotográfico]=“Sim”)>>Coordenadas: (<<[1006.1]>>)<>
|
<<[6.2 Visão panorâmica.]>>
Figura 2. Visão panorâmica.
<<If: ([192. Mostrar as coordenadas obtidas pelo AppSheet na legenda das fotos do relatório fotográfico]=“Sim”)>>Coordenadas: (<<[1006.2]>>)<>
|
<>
The result is not satisfactory. Some times one image goes to the next page. The small size is discarded because the images are very small to my pretentions. Yes, i use a table to try limitate the content. Some one have an idea to help me improve my report file?
How i did use the html template… he used icon class… what i need use and how many pixels is necessary? Sorry for many questions…
What type of template you are currently using? Google Docs? Other?
1 Like
pdf… here i am again… i tried this code:
<img src=”<<6.1 Visão panorâmica.>>” alt=“image” width=”400” height=“300”>
What is the type of template you are using to generate the PDF file?
1 Like
input:
<img src=”<>” alt="image" width=”400” height=“300”>
output:
i’m using google docs… to edit the template. Follow my template content…
1 Like
After you finish setting your template in Google Docs, click on File menu → Download and choose: Webpage HTML. Your template will be converted to HTML file saved on your PC.
Open the downloaded HTML file using a text editor, check the width of the cell containing the image. You can do that by locating the HTML tag preceding the
tag.
If your image is the first element in the cell, you’d normally find a <span tag ending just before <img begins. At the end of this <span tag, you’d find something like width: 400.00px; hight: 300.00px, or whatever numbers. These are the dimensions of your cell containing the image.
Based on these dimensions you can adjust the size of your image (inside the <img tag) to match the hight OR the width of the cell, or slightly less. Do NOT use both hight and width to adjust the size of your image; use only one of them to preserve the image’s aspect ratio.
After you finish, upload the modified HTML file to your Google Drive, and use it instead as your template in the task.
4 Likes
I will try this solution… i think it will works. thx, Joseph.
2 Likes
Welcome! This is how I’ve been doing it. Tell me please how it turns out for you. Thanks.
2 Likes
@neemias
By the way, another thing you can try is to remove the .. code from inside your template, and just insert the image in your Google Doc using the URL (Menu Insert → Image → URL). Adjust the image size manually in your template and its position before downloading the HTML file.
Also, with this manual image insertion and resizing, test the Google Docs template as is and see the results. Depending on the image, this might be sufficient and you wouldn’t need to download/adjust/upload a new HTML file.
2 Likes
Joseph, let me ask you. Are there an example of html template that i can adapt to my reality? The idea is to create a photographic report to use in field areas.
I’d say, just create your report in Google Doc, the way you like it, without any html code in the template; do everything manually using the menus and the formatting options provided, then download it as an html webpage, and there you have your html template.
I’m sorry I don’t have much experience in html; I just know few things to manage my way around. Surely @SkrOYC can offer you better help and service.
1 Like
Maybe you want to take a look at the below post as well.
Basically , you could include the image column expression in a table cell in a template and then you could control the width of the cell to control the size of the image. However in this approach you cannot change the aspect ration of the image. So please select a height that matches the width in terms of aspect ratio. So if your image is 400 pixel (width) by 200 pixel ( height) and if you choose to have cell width of 2 inches , then cell height will need to be at least 1 inch
https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Workflow-Output/td-p/271698
3 Likes
If i understood, the size of image in a column can be set through size of height of the cell… is it?
@Joseph_Seddik , I create a new code in HTML… Pass in test of bot run, but… Images are not showed in pdf file. Look that! Dear God!
Relatório Fotográfico
.logo {
width: 160px;
height: 90px;
}
.image {
width: 700px;
height: 400px;
}
hr {
width: 90%;
align: center;
}
body {
width: 210mm;
height: 297mm;
margin-top: 25px;
margin-bottom: 25px;
margin-right: 25px;
margin-left: 25px;
}
td {
width: 20%;
}
![]() |
Empresa: |
Periseg |
Regulador: |
<> |
| Email: |
neemias@periseg.com.br |
Fone: |
(51) 980259832 |
| Segurado: |
<> |
Sinistro: |
<> |
Item
![]() |
| Figura 1. Visão panorâmica. |
![]() |
| Figura 2. Altura das plantas. |
Emitido em <>
As I told you, I’m not the best person to help you with an html code. I gave some solutions based on Google Doc and converting it to html and do a little modification, not building an html page from scratch. I don’t know how to do it.
I’d say you have to src your images using URLs, not column values. This surely won’t work.
2 Likes