Is there some alternative to disabling the logic that converts base64 images into blobs? - tinymce

The 'images_dataimg_filter' option can also be used to specify a filter predicate function for disabling the logic that converts base64 images into blobs while within the editor.
With the new version of TinyMCE 6.1.0 the option images_dataimg_filter was removed. Is there some alternative to disabling the logic that converts base64 images into blobs.
Please share if any way to solve this.
Thanks

Related

How to get Delta from a row HTML string in flutter_quill?

Hallow! I need to insert HTML from server to flutter_quill editor, but how to do it? Maybe is it unable thing... Thanks for any answers!
I can make a new document from Delta or from JSON only
As far as I know flutter_quill don't support the html data types. I think it can provide data in delta, plain text & json formats only.
But you can use quill_html_editor library to use the html together with quill editor in flutter. The usage is almost like flutter_quill with more focus on html type content.
To set the html content to editor you just have to set the html string in the controller
await controller.setText(text);
Give it a try. May be it can fulfil your need.

In a fluid template, how to output the linked file's size?

In a fluid template, I would like to output a linked file's size.
I'm using f:link.page to link to the file, as I think this is the way to do it (please correct if not).
<f:link.page class="download" pageUid="fileadmin/redaktion/download/papers/{paper.download}" {paper.author}">PDF</f:link.page>
As I'm already using the extension ml_links on the site, I thought I could pass the link through lib.parseFunc_RTE, but
<f:format.html parseFuncTSPath="lib.parseFunc_RTE"><f:link.page class="download" pageUid="fileadmin/redaktion/download/papers/{paper.download}" {paper.author}">PDF</f:link.page></f:format.html>
just wraps it into p.bodytext.
Do I have to use a different syntax to apply f:format.html TO f:link.page - or is there a better way to do it (via a fluid or vhs viewhelper)?
Actually custom VH is fastest way to achieve that, i.e. basing on this VH, you'll need to replace size param with a file path, and then use i.e. filesize function of PHP to fetch the size in bytes.
Here's my VH:
https://gist.github.com/ursbraem/9645542
I've simplified the original a little, outputting "KiB" for file size is too technical for me.
The easiest way is to use native TYPO3 FAL parameter originalFile.size :
{audio.0.originalFile.size -> f:format.bytes()}
When i use fluidcontent i have vhs extension installed aswell and then just use:
<f:format.bytes decimals="1">{v:media.size(path: '{file}')}</f:format.bytes>
This outputs clean readable sizes like "28.2 MB".
If you are using VHS you may consider https://fluidtypo3.org/viewhelpers/vhs/master/Media/SizeViewHelper.html (in combination with f:format.bytes).
In newer TYPO3 versions you can use the originalResource.size attribute of a FileReference object.
{file.originalResource.size -> f:format.bytes()}
or in your case:
{paper.download.originalResource.size -> f:format.bytes()}
TYPO3 10
I needed a file size output for a DCE module in TYPO3 10, this is what I came up with, using VHS:
<f:format.bytes><v:media.size><v:format.trim characters="/"><f:uri.typolink parameter="{item.link}" /></v:format.trim></v:media.size></f:format.bytes>
Explained:
f:uri.typolink generates the full path I need for v:media.size
v:media.size requires the path without a leading slash, v:format.trim removes this character.
f:format.bytes displays the output from v:media.size in KB or MB.

showing bullets, numbering and images in pdf

In an asp.net mvc-2 application I need to export a view to pdf. I am using itextsharp to generate pdf. In the application I have documents which contains different instructions with instruction title and different images attached to it. I need to export all the instructions under a document to pdf. The instruction title contains bullets and numbering. It is stored in the database in html format. Also the images attached to each instruction is stored in the db in byte format. My pdf contains a table with each row representing an instruction. I am facing two basic issues in generating pdf with these data :
When I try to show the title, it is shown with html tags. In the pdf I need to show the title with bullets and numbers(ie. as entered through the editor).
I need to show byte stream images attached to each instruction in the pdf.
See the first three paragraphs of my post here for the answer to your first problem.
For your second question, iTextSharp (and more to the point, the PDF format) supports several formats. For formats not supported you can use the .Net Framework to convert many of them to a usable format. (The easiest to work with is probably JPEG.)
See this post if you need to know hot to get raw bytes from a database. Once you've got bytes you can use iTextSharp.text.Image.GetInstance() which has (as of 5.1.1) 15 overloads including ones that takes raw bytes, a System.Drawing.Image and `System.IO.Stream'.

How to display image blob from postgres to VB 6?

I have an application written in VB6 and would like to know how I would display an image blob from postgres to VB6?
If the image blob is in one of several standard formats (BMP, JPEG, GIF, TIFF file format) you can use WIA 2.0 for this.
Get the blob as a Byte array, create a WIA.Vector object, assign the Byte array to the Vector.BinaryData property, then you can use the Vector.Picture property to retrieve a StdPicture object you can assign to an Image or PictureBox control.
This code can help if the image can be loaded to a picture box.
See the PictureFromByteStream() Function in Module1.bas

Making a PDF output in raster format instead of vector using itextsharp

I have written C# code to save product specifications to a PDF document using iTextSharp, mainly with PdfPTable and Chunks/Paragraphs in the PdfPCells. However, I have been told that the output is unacceptable due to the fact that you can highlight and copy the text from the document and document storage and retrieval server software that they are currently using does not support "Vector" based PDFs. I'm not exactly certain what the difference is between a raster pdf and and vector pdf. Basically, every page of the PDF Document should be an image so that the text can not be highlighted. Is there any way to do this without using the DirectContent? Below is an image, illustrating a portion of the PDF that was created, and how the text can be selected and copied, which is the incorrect functionality.
I would like to avoid directly writing to the canvas, unless there is a way to do this and still have itextsharp handle my formatting and proper paging.
The windows application PDF2R works well, but doesn't seem to offer any programmatic solutions. I have found libraries that stated that they do this sort of conversion, but are several thousand dollars. I'd like to work within my budget and use the itextsharp or something much cheaper than this.
I would suggest you try to generate an image using the System.Drawing class and then insert that into the PDF document.
Call this code on your PdfWriter object:
writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
This won't prevent users from selecting text, but it will prevent them from copying and pasting it. Give it a try.