I stumbled upon another issue when generating pdfs today,
When I try to insert an image from sharepoint by converting it to base64 it does not show up on the pdf document. If
I paste the HTML code which is generated before hand for the pdf into a html document and let it run on chrome the image shows up perfectly and everything fits. Any ideas ?
My generated HTML code:
<!DOCTYPE html><html><header><meta charset="UTF-8"><img class="logo" src="BASE64ConvertedImageNormallyHere,CutForCharLimit" width="150" height="100" style="background:black;padding: 5px 5px 5px 5px;position:absolute;margin-top:-25px;margin-left:10px"><h3 class ='top' style='text-align:center;padding-left:20px;'>Besuchsbericht</h3> <hr style='content: '*';display: inline-block;position: relative;top: -0.7em;font-size: 1em;padding: 0 0.15em;background: white;'> </header> <body> <div>Vertreter: xXx</div> <div>Kunde: xXx</div> <div>Datum: xXx</div> <hr> <b>Bericht</b> <div>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</div> <hr style='content: '*';display: inline-block;position: relative;top: -0.7em;font-size: 1em;padding: 0 0.15em;background: white;'> </body> </html>
My Pdfs are also 70kb bigger than before so the Base64 encoding is for sure present. Flow shows no error and generates the pdf, just without an image.
Sadly that is already what I am doing, the HTML is concated together and then flow creates a html file with that in my private one drive, that file is then converted to a pdf and saved to our teams folder.
How is the PDF conversion taking place exactly after the step where the HTML file is created? It could be that the HTML cannot be directly converted to a PDF file. What way is currently being used for that part from HTML to PDF?
I am using One Drive for Business: Convert File using Path to do the conversion and then Sharepoint: Create File to create the converted file in a teams folder.
Does Flow run fail? Or does it succeed but silently fail to accomplish the goal?
Does the file get created (PDF) but show nothing as you are saying?
Stepping back one level, does the HTML file get created and does that one have the correct content and does that one work?
We made a test Flow with Create HTML to OneDrive then convert HTML file to PDF write to OneDrive and we were successful.
We do not know why you were not successful.
When I have done this before (I normally use the Word one but have done a few HTML) I always include a get file content for my image and it has worked like that. Might try that.
Check out new user group experience and if you are a leader please create your group
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Don't miss the call this month on June 16th - 8a PDT