In the image plugin, before entering any image url you can observe some text in the 'Preview' window. And after inserting a valid image url, you can see the image in the preview window but the text is still present below the image preview. Any specific reason behind this?
Also, do I have the permission to remove this text?
I think it is a legacy thing from the days of using the editor to set the image alignment. It's there to show you how it is positions around text or whatever you are placing your image before.
It is confusing though and to remove it you need to add this to your config:
config.image_previewText = ' ';
I found you have to set it to an empty space rather than an empty string else it defaults to lorem ipsum.
Related
I'm using the mimo code app for coding. I saved a picture from google in the folder "Saved Pictures". The file name is "generic background". I did the code <="/Saved Pictures/generic background.jpg">. But the image does not show. Instead what shows is a small file. Don't really know how to get the image to show. I did used img src before =, but I need 10 reputations points to post an image even though I was just trying to show the code.
i have tried using some photo editors online but to no avail. trying to extract and use a background image for a particular web page without the text from the image
If you're able to use Photoshop you can try to Content-Aware Fill.
I made a PowerPoint template where one of the text boxes is configured with a font size, a fixed height and width, and "Shrink text on overflow".
I read the PPTX in a web service, replace the text inside the text box, and send the finished document to the client. Regularly the text inside the box is more than would fit within the box with the default font size. However, when the PPTX from the server is opened by the client, the text is still overflowing outside the bounds of the text box. Only after for example duplicating the slide will PowerPoint adapt the font size in the text box to let the text fit.
How can I force PowerPoint to already update the layout when first opening/displaying the document, instead of only when actually modifying the document manually? I tried setting each and every "dirty" attribute inside the slide XML, as I was confident this would force PowerPoint to recalculate the layout, but didn't actually help.
Any ideas on the issue? My only other option would be to open the document via automation on the server and force the layout update there.
Thanks in advance!
Using iTextSharp (4.1.6) in a Xamarin.Forms app.
I have lines of data with CRLF at the end of each. I put these into paragraphs, which I add to the doc. At then end of many, I add to the doc one or more images (photos). Works great.
Now, I'd like to have a page break after the last image, so I get a fresh start.
But iText seems to be flowing the text around the image some, and sometimes I don't get that page break, at last not where I want it. The next paragraph follows immediately after the image.
I tried adding a small paragraph after the image, but this did not solve. I did find that adding a SECTION seems to cause a good break, but puts some text in that I don't want or need.
I don't seem to find anything like API documentation for this, I've been just working from examples.
It seems like this would be really easy. What am I doing wrong?
iText seems to be flowing the text around the image some
Indeed, if you add an image to your document which does not fit on the current page anymore (but there still is some place for text on that page), iText does not immediately start a new page but keeps the image in memory and waits for your next content additions. If you then add text, that text first fills the current page, and only if even text does not fit anymore (or if you add another image), a new page is started and the waiting image is added.
You can switch this off using for your PdfWriter writer using
writer.StrictImageSequence = true;
I am developing a Windows Store chat app.
In this apps, I am using a TextBox to receive message content from the user. I want to implement Emoticons (Smileys) such that typing a code gives a respective image inline with the text.
For example, for :), I want to have a 'smile' image.
What you'll need to do is use a RichTextBlock to display your text. This will give you access to a adding in an InlineUIContainer block where necessary.
So, your process will be:
Accept text in a regular text box
Parse the text into a series of Inlines (Run, InlineUIContainer, etc)
Create a new Paragraph for the message
Add the Inliness to the Paragraph.
Add the Paragraph to your RichTextBlock's Blocks property (a BlockCollection).
For each piece of text:
Split the text, likely using Regex, searching for the keys which trigger an Image (':)', '(heart)', etc).
For each non-image text, create a Run with the Text set to the text of the split
For each Image, create an InlineUIContainer and an Image. Set the Image source to the proper Image path, then set the Child of the InlineUIContainer to the Image.
Add the Run or InlineUIContainer the Paragraph via Paragraph.Blocks.Add(Inline).
Certain icons may be included in the Segoe UI Symbol Font Family. If this is the case, you may choose to not use an Image for that symbol, and instead use a Run with the FontFamily set to Segoe UI Symbol. You can play around with the FontSize if you want them to be more prominent.
Hope this helps and happy coding!