cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lmantzorou
New Member

Conversion of PDF file is not supported - Value cannot be null message

Hello I have the following flow :

 

error_flow.PNG

 

and I get this error when I try to run it:

 

Capture.PNG

my HTML is this:

 

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="layout.css">
<title>Supermarket Flyer</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles/layout.css" type="text/css">
<!--[if lt IE 9]><script src="scripts/html5shiv.js"></script><![endif]-->
</head>
<body>
<!-- content -->
<div class="wrapper row2">
<div id="container" class="clear">
<!-- Slider -->
<section id="slider" class="clear">
<figure><img src="images/demo/630x300.gif" alt="">
<figcaption>
<h2>Eu justo augue estas</h2>
<p>Nullamlacus dui ipsum conseque loborttis non euisque morbi penas dapibulum orna. Urnaultrices quis curabitur phasellentesque congue magnis vestibulum quismodo nulla et feugiat adipiscinia pellentum leo.</p>
</figcaption>
</figure>
</section>
<!-- main content -->
<div id="intro">
<section class="clear">
<!-- article 1 -->
<article class="two_quarter">
<h2>Offers</h2>
</article>
<!-- article 2 -->
<article class="two_quarter lastbox">
<figure>
<ul class="clear">
<li><a href="#"><img src="',variables('product_photo'),'"></a></li>
<li><a href="#"><img src="images/demo/130x130.gif" width="130" height="130" alt=""></a></li>
<li class="last"><a href="#"><img src="images/demo/130x130.gif" width="130" height="130" alt=""></a></li>
</ul>
</figure>
</article>
</section>
</div>
<div id="homepage" class="last clear">
<section class="two_quarter lastbox">
<h2 class="title">Logo</h2>
<img class="imgl" src="images/demo/130x130.gif" width="130" height="130" alt="">
</section>
</div>
<!-- / content body -->
</div>
</div>
<!-- Footer -->
<div class="wrapper row3">
<footer id="footer" class="clear"></footer>
</div>
</body>
</html>

 

If you have any ideas of what I've done wrong please share, I'm just starting to use Power apps

5 REPLIES 5
v-jefferni
Community Support
Community Support

Hi @lmantzorou ,

 

Could you please share more details of your flow? Have you succeeded to create the first HTML file? Could you check if the HTML file has been created correctly? 

 

Please expand all the steps above the "create file" action and share the details of each action through screenshots.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

thank you for your reply! below is the previous actions expanded:

lmantzorou_0-1643875015837.png

and here is a screenshot of the run which shows that the previous actions have been completed successfully  :

lmantzorou_1-1643875111346.png

Also, the HTML file has been created in my OneDrive and I can open and see it

 

lmantzorou_2-1643875216590.png

the html file : 

 

lmantzorou_3-1643875267735.png

 

It is a really simple file, my goal is to dynamically make a Supermarket Flyer using data from an excel file and pictures from a folder. I don't know if something like this can be achieved successfully through power apps because this will require an advanced html code and css integration.

Thank you for your help! All comments acceptable  





Hi @lmantzorou ,

 

The issue is from the images:

<li><a href="#"><img src="',variables('product_photo'),'"></a></li>
<li><a href="#"><img src="images/demo/130x130.gif" width="130" height="130" alt=""></a></li>
<li class="last"><a href="#"><img src="images/demo/130x130.gif" width="130" height="130" alt=""></a></li>

 

Delete the three lines could make the flow run successfully. I'm not familiar with HTML script so cannot help further. Sorry about that.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

So seems like the problem is with the line:

<li><a href="#"><img src="',variables('product_photo'),'"></a></li>

that I want to dynamically take the photo from my onedrive folder (initialize variable action)

The error that appears in the stage of the conversion to pdf is because of that line.

What should I do differently to make the conversion work without compromising with a non-dynamic photo?

 

I tried changing the create file step to this:

lmantzorou_0-1643888748673.png

 

so instead of having the line:

<li><a href="#"><img src="',variables('product_photo'),'"></a></li>

inside the concat expression I place it outside of it with the variable. This works almost perfectly because then there is no error with the conversion and the pdf file is made but the picture appears like a text

 

lmantzorou_1-1643889030236.png

dynamic photo is the highlighted text bellow (pdf version)

lmantzorou_2-1643889059042.png

 

 

Hi @lmantzorou ,

 

If I replace the images with some online resources it could work well. So could you please try and create an image with this variable and store it somewhere first then test if the conversion works by putting the link to the created image as the first image in the HTML text?

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,332)