Forum Discussion
McTwitch
Feb 03, 2022Copper Contributor
Converting HTML to PDF - Inline-Block Elements Don't Work
Hello everyone! I'm working on a flow that takes the response from an MS Form, imports the response into an HTML document, converts the HTML to a PDF, and finally emails the PDF to someone. The p...
hansleroy
Feb 03, 2022Iron Contributor
Hi McTwitch,
What I'd try:
1/ remove
style="display:inline-block"
2/ or remove
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO0AAAAwCAIAAAByj2opAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQ...
Does that make any difference?
Kind regards
Hans
McTwitch
Feb 03, 2022Copper Contributor
Hello hansleroy!
Unfortunately, I can't remove those parts. The <img> tag is an image that I need in the final document, and I'm trying to get the <table> and the <img> to display in-line with eachother.
- hansleroyFeb 04, 2022Iron ContributorHi,
Well, at least something has to be tweaked, no?
At least I'd remove the <table> tags to see if it makes any difference.
Kind regards
Hans- jefmeyerFeb 07, 2022Iron ContributorWe're attempting something similar. In our case, generating a HTML file using DIVs to display and image and overlay text on the image. The HTML file is generated correctly, however when converting via the OneDrive step, the overlay text is "stacked up" at the bottom of the PDF. Using the browser print on the HTML file, the text is correctly placed in the PDF. Perhaps this is a bug/limitation of the Convert File step and why still in preview? Curious to know if anyone has successfully accomplished this.
- McTwitchFeb 08, 2022Copper ContributorWait, so when you take the generated HTML and use the print to PDF function, the text displays correctly?
I honestly haven't tried that, but it does take away from the auto-generated portion of it. I know that I went through and created an HTML document by hand that had all of the correct formatting, and when I copied and pasted it into the Create a Document portion of my flow, a lot of the formatting didn't stick, so I've been working on recreating all of it in that box, to make sure what I have actually works. I'm just getting stuck on the getting the image and text to display in-line!
Any chance I could take a look at your flow, to see how you have it set up?