Skip to content

Commit

Permalink
fix #413 - add images to existing PDF (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swati4star committed Dec 3, 2018
1 parent 74ee689 commit 7a1cad3
Show file tree
Hide file tree
Showing 16 changed files with 541 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
minSdkVersion 21
multiDexEnabled true
targetSdkVersion 28
versionCode 74
versionName "8.4.7"
versionCode 75
versionName "8.4.8"
}
buildTypes {
release {
Expand Down
24 changes: 19 additions & 5 deletions app/src/main/assets/whatsnew.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
{
"data": [
{
"title": "Merge PDF",
"content": "Easily select multiple PDF at once to merge",
"icon": "ic_merge_type_black_24dp"
"title": "Modify Existing PDF",
"content": "Add images to existing PDF",
"icon": "ic_add_black_24dp"
},
{
"title": "Access doc & docx files",
"content": "Now, you can convert doc & docx files also to PDF",
"title": "Rearrange images while creating PDF",
"content": "Now, you can easily sort images while creating PDF using images",
"icon": "ic_text_format_black_24dp"
}
],
"old_data": {
"version_code": [
//paste old data here
],

"74" : [
{
"title": "Merge PDF",
"content": "Easily select multiple PDF at once to merge",
"icon": "ic_merge_type_black_24dp"
},
{
"title": "Access doc & docx files",
"content": "Now, you can convert doc & docx files also to PDF",
"icon": "ic_text_format_black_24dp"
}
],

"72": [
{
"title": "Add watermark",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import swati4star.createpdf.BuildConfig;
import swati4star.createpdf.R;
import swati4star.createpdf.fragment.AboutUsFragment;
import swati4star.createpdf.fragment.AddImagesFragment;
import swati4star.createpdf.fragment.ExtractImagesFragment;
import swati4star.createpdf.fragment.HistoryFragment;
import swati4star.createpdf.fragment.HomeFragment;
Expand All @@ -47,6 +48,7 @@
import static swati4star.createpdf.util.Constants.ACTION_SELECT_IMAGES;
import static swati4star.createpdf.util.Constants.ACTION_TEXT_TO_PDF;
import static swati4star.createpdf.util.Constants.ACTION_VIEW_FILES;
import static swati4star.createpdf.util.Constants.ADD_IMAGES;
import static swati4star.createpdf.util.Constants.ADD_PWD;
import static swati4star.createpdf.util.Constants.BUNDLE_DATA;
import static swati4star.createpdf.util.Constants.COMPRESS_PDF;
Expand Down Expand Up @@ -343,6 +345,11 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
bundle.putString(BUNDLE_DATA, COMPRESS_PDF);
fragment.setArguments(bundle);
break;
case R.id.nav_add_images:
fragment = new AddImagesFragment();
bundle.putString(BUNDLE_DATA, ADD_IMAGES);
fragment.setArguments(bundle);
break;
case R.id.nav_help:
Intent intent = new Intent(this, WelcomeActivity.class);
intent.putExtra(SHOW_WELCOME_ACT, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ private void performOperation(int index, int position, File file) {
case 9: // Add Watermark
mPDFUtils.setWatermark(file.getPath(), ViewFilesAdapter.this, mFileList);
break;
case 10: // Add Images
mPDFUtils.setImages();
break;
}
}

Expand Down
Loading

0 comments on commit 7a1cad3

Please sign in to comment.