moving StreamFactories to core and making OverlayPDF use stream reader