我有这个布局,我想在屏幕上打印所有内容到PDF.
包括滚动视图中的所有内容.我稍后也会尝试使用IText这样做,但是现在我想看看我是否可以使用PrintedPdfDocument和View.draw来完成它.我所生成的PDF,但只有部分布局在PDF上可见.
这是布局:
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"
android:id="@+id/relativeLayout">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Title"
android:id="@
最后
以上就是外向哈密瓜最近收集整理的关于android 生成pdf,使用PrintedPdfDocument和View.draw从Android生成PDF的全部内容,更多相关android内容请搜索靠谱客的其他文章。
发表评论 取消回复