This question is motivated by the recent question about searching inside of the NB files.
According to the Documentation, ToString expects a high-level WL expression as the first argument:
expr = Row[{Style["Format", Bold], "ted", " string"}]
ToString[expr]
Formatted stringFormatted string
Unlike Rasterize it does not interpret raw boxes as an expression in the low-level box language:
cell = Cell[BoxData@ToBoxes@expr, "Output"];
Rasterize[cell]
ToString[cell]
Cell[BoxData[TemplateBox[{StyleBox["Format", Bold, StripOnInput -> False], "ted", " string"}, RowDefault]], Output]
Unfortunately MakeExpression isn't always able to convert a valid raw boxes into the corresponding high-level expression (although in the above simple case it can). Also conversion from raw boxes into high-level expression breaks the original formatting (for example, it does not preserve the infix, prefix and postfix notations, and the author's line breaks etc.) and should best be avoided.
Is it possible to convert arbitrary raw boxes directly into the corresponding String without resorting to MakeExpression?
I'm especially interested in converting raw Cells into pure strings for the purposes of textual searching inside of NB files.

cell). It is about the raw boxes input and the expected output (whatRasterizegives as an image which I don't want) and wantedStringwithout formatting and suitable forStringMatchQetc. – Alexey Popkov May 18 '16 at 10:13Cells in a Notebook to plaint text, conversion cell-by-cell will be extremely slow (and the final goal is to convert a lot of Notebooks for the purposes of textual searching inside of them). Also is it possible to pass thePageWidth -> Infinityoption somehow? I tried to include it intoCellexpression and set at the global level butFrontEnd`ExportPacketignores it. – Alexey Popkov May 18 '16 at 13:42First[FrontEndExecute[ FrontEnd`ExportPacket[NotebookGet@EvaluationNotebook[], "PlainText"]]]– Kuba May 18 '16 at 13:44PageWidth -> Infinityset by default! You can post this as an answer. – Alexey Popkov May 18 '16 at 14:08FrontEnd`ExportPacketsolution mostly works but sometimes returns justNull(second attempt usually gives success). Do you have any idea how to deal with this problem? It looks like sometimes the call toFrontEnd`ExportPacketis ended before the data is returned. Or may be FrontEnd sometimes just doesn't accept a call? – Alexey Popkov May 19 '16 at 06:06