hi
when i convert a xps document to pdf, using PdfDocument.LoadFromXPS(file), then if the xps contains text with right-to-left flow direction, the output to pdf document appears reversed.
example:
private void test2()
{
string xpsPath = "d:\\tmpxps.xps";
UIElement vis = new TextBlock() { Text = "אבג דהו", FlowDirection = FlowDirection.RightToLeft };
System.Windows.Xps.Packaging.XpsDocument xpsd = new System.Windows.Xps.Packaging.XpsDocument(xpsPath, FileAccess.ReadWrite);
var xw = System.Windows.Xps.Packaging.XpsDocument.CreateXpsDocumentWriter(xpsd);
xw.Write(vis);
xpsd.Close();
PdfDocument docp = new PdfDocument();
docp.LoadFromXPS("d:\\tmpxps.xps");
string pdfPath = "d:\\tmppdf.pdf";
docp.SaveToFile(pdfPath);
docp.Close();
}
(inside the xpsDocument package, the text "אבג דהו" found within Glyphs with BidiLevel=1, the xpsToPdf converer does not honor this property).
thanks for yours treatment