有没有办法旋转在Android中使用PdfDocument画布创建的PDF文件,还是有什么方法可以在保存到Android手机之前旋转pdf文件?
是的,有办法。在绘制PDF文档的画布之前使用canvas.rotate(90);
。
canvas.save();
// rotate with respect to center of the page.
canvas.rotate(90, canvas.getWidth() / 2, canvas.getHeight() / 2);
canvas.draw(/*whatever*/);
canvas.restore();