2017-09-24 8 views
2

私は、ユーザーから収集したデータからPDFを生成できるという最終的な目的でアンドロイドアプリを作成しています。私の研究を始めるにはどこが良いですか?私が研究しなければならないAPIまたはスタジオのプラグインはありますか?どこから始めますか:AndroidアプリケーションでPDFを作成する

ありがとう、素晴らしい週末をお過ごしください!

答えて

1

あなたはandroid.graphics.pdfライブラリリファレンスページがhttps://developer.android.com/reference/android/graphics/pdf/package-summary.html で、uは

// create a new document 
PdfDocument mydocument = new PdfDocument(); 

// crate a page description 
PageInfo mypageInfo = new PageInfo.Builder(new Rect(0, 0, 100, 100), 1).create(); 

// start a page 
Page mypage = mydocument.startPage(mypageInfo); 

// draw something on the page 
View content = getContentView(); 
content.draw(mypage.getCanvas()); 

// finish the page 
mydocument.finishPage(mypage); 
. . . 
// add more pages 
. . . 
// write the document content 
mydocument.writeTo(getOutputStream()); 

// close the document 
mydocument.close(); 
+0

またはUを使用することができますhttps://stackoverflow.com/questions/25392664/generate-pdf-inコードの下に使用することができます必要があります-android-without-any-3rd-party-library –

+0

おかげさまで、皆さんに感謝します。私はこれで遊ぶことを楽しみにしています。ご多幸を祈る! –

+0

大歓迎です –

関連する問題