#### Repository https://github.com/Swati4star/Images-to-PDF #### PDF Convertor https://play.google.com/store/apps/details?id=swati4star.createpdf <blockquote> <p>PDF CONVERTER is an easy to use application to convert Images to PDF. This is basically an images to PDF Converter. The simplicity of this app makes it an ultimate PDF Converter for your device.</p> </blockquote> ### New Features [Link to Feature Request](https://github.com/Swati4star/Images-to-PDF/issues/427)     - What feature(s) did you add? Added new feature to scan QR or Barcodes and convert the result in PF format. - How did you implement it/them? As mentioned [xzing](https://github.com/zxing/zxing) in the task request by project owner, I considered the mobile version of [zxing](https://raw.github.com/embarkmobile/zxing-android-minimal). Here is the implementation details. Zxing is an popular QR and barcode scanner open source library. <blockquote> <p>ZXing ("zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages.</p></blockquote> Created [QrBarcodeScanFragment](https://github.com/Swati4star/Images-to-PDF/blob/master/app/src/main/java/swati4star/createpdf/fragment/QrBarcodeScanFragment.java) frament which will open camera based on user selection i. e. QR or Barcode. The scan result captured was initially written to a TEMP text file and later converted to PDF using existing implementation of the app. ``` File mDir = getContext().getCacheDir(); File mTempFile = new File(mDir.getPath() + "/" + mTempFileName); PrintWriter mWriter = null; try { mWriter = new PrintWriter(mTempFile); mWriter.print(""); mWriter.append("Result : " + result.getContents()); mWriter.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } Uri uri = Uri.fromFile(mTempFile); resultToTextPdf(uri); ``` Methods to open Camera to scan QR and Barcodes. ``` /** * Open camera for Barcode Scan */ public void openCameraForBarcode() { IntentIntegrator integrator = IntentIntegrator.forSupportFragment(this); // use forSupportFragment or forFragment method to use fragments instead of activity integrator.setDesiredBarcodeFormats(IntentIntegrator.ONE_D_CODE_TYPES); integrator.setPrompt(mActivity.getString(R.string.scan_barcode)); integrator.setScanningRectangle(1000, 450); integrator.setResultDisplayDuration(0); // milliseconds to display result on screen after scan integrator.setCameraId(0); // Use a specific camera of the device integrator.initiateScan(); } /** * Open camera for QRCode Scan */ public void openCameraForQrcode() { IntentIntegrator integrator = IntentIntegrator.forSupportFragment(this); // use forSupportFragment or forFragment method to use fragments instead of activity integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES); integrator.setPrompt(mActivity.getString(R.string.scan_qrcode)); integrator.setScanningRectangle(600, 600); integrator.setResultDisplayDuration(0); // milliseconds to display result on screen after scan integrator.setCameraId(0); // Use a specific camera of the device integrator.initiateScan(); } ``` Converting text to PDF and preview.. ``` /** * Generate Result to PDF * @param uri */ private void resultToTextPdf(Uri uri) { new MaterialDialog.Builder(getActivity()) .title(R.string.creating_pdf) .content(R.string.enter_file_name) .input(getString(R.string.example), null, (dialog, input) -> { if (StringUtils.isEmpty(input)) { showSnackbar(getActivity(), R.string.snackbar_name_not_blank); } else { final String inputName = input.toString(); if (!mFileUtils.isFileExist(inputName + getString(R.string.pdf_ext))) { createPdf(inputName, uri); } else { MaterialDialog.Builder builder = createOverwriteDialog(getActivity()); builder.onPositive((dialog12, which) -> createPdf(inputName, uri)) .onNegative((dialog1, which) -> resultToTextPdf(uri)) .show(); } } }) .show(); } ``` #### GitHub Account [Pull Request](https://github.com/Swati4star/Images-to-PDF/pull/439) https://github.com/santoshhiremani
author | hiremani | ||||||
---|---|---|---|---|---|---|---|
permlink | implementing-qr-and-barcode-result-to-pdf-in-pdf-converter-android-app-1538327038296 | ||||||
category | utopian-io | ||||||
json_metadata | {"app":"steemit/0.1","format":"markdown","image":["https://ipfs.busy.org/ipfs/QmSyksFJY7q6cBEhuzXLJjwiekRnh6mK1Hz3FyWwMKEsws","https://ipfs.busy.org/ipfs/QmeetqmVjVug1Eovh2j3vqQKagcRpdydTJa2ef1mLVTEVU","https://ipfs.busy.org/ipfs/QmV8yYASiXfGmv6LesYLDrKFrnDhywargNtPjF11nWM81G","https://ipfs.busy.org/ipfs/QmR9t3HDg3RRxfyv5YVKXH1436dVb7yq6CN7PhiceJ1b3N"],"tags":["utopian-io","development","pdf","android"],"links":["https://github.com/Swati4star/Images-to-PDF","https://play.google.com/store/apps/details?id=swati4star.createpdf","https://github.com/Swati4star/Images-to-PDF/issues/427","https://github.com/zxing/zxing","https://raw.github.com/embarkmobile/zxing-android-minimal","https://github.com/Swati4star/Images-to-PDF/blob/master/app/src/main/java/swati4star/createpdf/fragment/QrBarcodeScanFragment.java","https://github.com/Swati4star/Images-to-PDF/pull/439","https://github.com/santoshhiremani"]} | ||||||
created | 2018-09-30 17:04:00 | ||||||
last_update | 2018-09-30 17:37:27 | ||||||
depth | 0 | ||||||
children | 5 | ||||||
last_payout | 2018-10-07 17:04:00 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 74.680 HBD | ||||||
curator_payout_value | 25.831 HBD | ||||||
pending_payout_value | 0.000 HBD | ||||||
promoted | 0.000 HBD | ||||||
body_length | 5,080 | ||||||
author_reputation | 7,035,336,488,338 | ||||||
root_title | "Implementing QR and Barcode scanner and converting result to PDF in PDF CONVERTER Android App" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 100,000.000 HBD | ||||||
percent_hbd | 10,000 | ||||||
post_id | 72,365,744 | ||||||
net_rshares | 52,084,322,860,319 | ||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
doughtaker | 0 | 27,014,817,738 | 100% | ||
rafalski | 0 | 31,999,120,259 | 76% | ||
codingdefined | 0 | 7,869,968,681 | 10% | ||
andrejcibik | 0 | 99,772,713,949 | 100% | ||
buckydurddle | 0 | 33,348,852,138 | 100% | ||
espoem | 0 | 8,206,643,273 | 10% | ||
utopian-io | 0 | 51,110,218,772,656 | 35.3% | ||
amosbastian | 0 | 33,271,397,697 | 36.98% | ||
tdre | 0 | 13,866,526,867 | 100% | ||
grzesiekb | 0 | 148,525,475,007 | 100% | ||
jjay | 0 | 414,395,775 | 100% | ||
thetroublenotes | 0 | 226,889,455 | 2% | ||
sudefteri | 0 | 3,429,656,113 | 100% | ||
simplymike | 0 | 47,868,761,458 | 40% | ||
belkar | 0 | 510,994,488 | 100% | ||
beetlevc | 0 | 1,101,831,196 | 2% | ||
brooks228 | 0 | 510,984,320 | 100% | ||
andrei8 | 0 | 513,149,034 | 100% | ||
natalliav | 0 | 510,998,251 | 100% | ||
radomim | 0 | 511,024,017 | 100% | ||
teovsumsel | 0 | 513,402,336 | 100% | ||
mashussyrtva | 0 | 511,058,611 | 100% | ||
dinsipov00 | 0 | 513,448,950 | 100% | ||
bouquetclick | 0 | 511,042,380 | 100% | ||
decorousoutspoke | 0 | 510,982,714 | 100% | ||
hipolitc | 0 | 511,059,657 | 100% | ||
mightypanda | 0 | 37,234,579,824 | 40% | ||
berwynelbow | 0 | 515,317,305 | 100% | ||
grindanalogue | 0 | 513,078,510 | 100% | ||
friedradius | 0 | 513,100,514 | 100% | ||
gazegamete | 0 | 513,104,229 | 100% | ||
grandiosetucana | 0 | 513,090,011 | 100% | ||
greatestspicy | 0 | 511,040,858 | 100% | ||
chewycareless | 0 | 511,069,402 | 100% | ||
katjalirenko | 0 | 513,383,122 | 100% | ||
peruska | 0 | 513,389,189 | 100% | ||
ingusik | 0 | 515,318,906 | 100% | ||
artyrsedakov | 0 | 511,038,850 | 100% | ||
tamilaisaeva | 0 | 510,958,151 | 100% | ||
antonpalesov | 0 | 511,022,808 | 100% | ||
truthly | 0 | 139,311,573 | 100% | ||
andreiakilov | 0 | 511,042,636 | 100% | ||
dinasamoilova | 0 | 511,031,997 | 100% | ||
throwjoke | 0 | 511,034,349 | 100% | ||
pumpdyke | 0 | 510,997,168 | 100% | ||
desktopcarrots | 0 | 511,002,480 | 100% | ||
butlervault | 0 | 511,055,716 | 100% | ||
hastypeacock | 0 | 510,959,126 | 100% | ||
templateflask | 0 | 511,051,023 | 100% | ||
bumpyforster | 0 | 512,164,799 | 100% | ||
waveoutsiders | 0 | 512,178,391 | 100% | ||
goringdriver | 0 | 510,996,462 | 100% | ||
cubesroom | 0 | 510,973,044 | 100% | ||
xericparrot | 0 | 509,257,168 | 100% | ||
insidescraper | 0 | 512,339,726 | 100% | ||
userglorious | 0 | 510,999,001 | 100% | ||
haircuttogether | 0 | 513,377,915 | 100% | ||
bubblyhexes | 0 | 510,989,500 | 100% | ||
knifedutiful | 0 | 511,015,083 | 100% | ||
lipspin | 0 | 512,659,039 | 100% | ||
mischiefrunner | 0 | 510,974,418 | 100% | ||
olivineplot | 0 | 512,115,658 | 100% | ||
appearford | 0 | 513,141,905 | 100% | ||
nseregin8 | 0 | 511,086,406 | 100% | ||
asavin88 | 0 | 511,061,560 | 100% | ||
vtemnotu | 0 | 510,994,885 | 100% | ||
mops2e | 0 | 203,674,948 | 7.69% | ||
synonymsdiapir | 0 | 511,037,566 | 100% | ||
dauphinegriping | 0 | 511,030,219 | 100% | ||
massfishing | 0 | 511,037,117 | 100% | ||
englishbracket | 0 | 510,962,244 | 100% | ||
affineclever | 0 | 507,991,423 | 100% | ||
aridknowledge | 0 | 511,080,572 | 100% | ||
curryvoid | 0 | 513,391,418 | 100% | ||
ovariangroups | 0 | 512,174,049 | 100% | ||
tuilleswine | 0 | 511,072,216 | 100% | ||
bananalodge | 0 | 513,144,803 | 100% | ||
ringbiceps | 0 | 512,650,232 | 100% | ||
soulfulurban | 0 | 513,417,254 | 100% | ||
secretecandy | 0 | 510,993,939 | 100% | ||
steem-ua | 0 | 428,803,731,337 | 2.56% | ||
rdzhervis | 0 | 512,334,899 | 100% | ||
dzhozefrays | 0 | 513,460,327 | 100% | ||
patrikallan | 0 | 512,647,556 | 100% | ||
klintonm | 0 | 511,040,320 | 100% | ||
devidrays | 0 | 511,083,847 | 100% | ||
sabitovv | 0 | 513,182,469 | 100% | ||
wallacerashid | 0 | 513,399,047 | 100% | ||
sergeyrevutskiy | 0 | 513,398,114 | 100% | ||
nikbelin1983 | 0 | 511,085,290 | 100% | ||
ekarina10 | 0 | 512,127,792 | 100% | ||
bors.hl88 | 0 | 512,614,491 | 100% | ||
kosirinr | 0 | 512,162,540 | 100% | ||
uliaa | 0 | 513,140,888 | 100% | ||
kaczynski | 0 | 62,026,153 | 100% | ||
hiremani | 0 | 5,045,722,079 | 100% | ||
mysterons | 0 | 361,676,733 | 10% | ||
curbot | 0 | 3,871,574,214 | 10% | ||
dryemigrate | 0 | 515,509,627 | 100% | ||
providetag | 0 | 515,501,425 | 100% | ||
signaturelava | 0 | 511,004,176 | 100% | ||
beginfloating | 0 | 512,150,725 | 100% | ||
ampereepoch | 0 | 512,093,519 | 100% | ||
pastpoles | 0 | 509,265,024 | 100% | ||
swati4star | 0 | 0 | 100% |
Thank you for your contribution. It's good to see you are taking the Features Request and working on it. Improving the code commenting would have been better. Since you are writing the file in a temp location, are you deleting the file after convert also before writing are you checking is the device has the required storage capacity. ---- Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category. To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/2322222). ---- Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
author | codingdefined |
---|---|
permlink | re-hiremani-implementing-qr-and-barcode-result-to-pdf-in-pdf-converter-android-app-1538327038296-20181001t044740346z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2322222","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"} |
created | 2018-10-01 04:47:39 |
last_update | 2018-10-01 04:47:39 |
depth | 1 |
children | 2 |
last_payout | 2018-10-08 04:47:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 9.468 HBD |
curator_payout_value | 3.077 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 832 |
author_reputation | 530,780,094,444,084 |
root_title | "Implementing QR and Barcode scanner and converting result to PDF in PDF CONVERTER Android App" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 72,390,648 |
net_rshares | 6,335,959,873,114 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
pixelfan | 0 | 1,074,013,117 | 0.54% | ||
espoem | 0 | 15,552,554,567 | 15% | ||
utopian-io | 0 | 6,259,307,849,776 | 4.34% | ||
zapncrap | 0 | 1,735,151,154 | 5% | ||
amosbastian | 0 | 8,802,133,619 | 10.25% | ||
curx | 0 | 1,787,038,430 | 5% | ||
reazuliqbal | 0 | 7,059,566,147 | 10% | ||
hakancelik | 0 | 10,661,663,913 | 30% | ||
mightypanda | 0 | 27,247,508,462 | 30% | ||
anonyvoter | 0 | 1,300,174,002 | 50% | ||
fastandcurious | 0 | 1,158,332,152 | 30% | ||
mops2e | 0 | 273,887,775 | 10% | ||
swati4star | 0 | 0 | 0% |
Thank you for reviewing, Since we don't have implementation from converting direct text in PDF Converter so as of now we just added TEMP file just to read QR/Barcode result, every time its scans its gonna clear and add new result to it. Yes its not right approach soon i'm modifying core class to handle this operation.
author | hiremani |
---|---|
permlink | re-codingdefined-re-hiremani-implementing-qr-and-barcode-result-to-pdf-in-pdf-converter-android-app-1538327038296-20181001t064730688z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-10-01 06:47:33 |
last_update | 2018-10-01 06:47:33 |
depth | 2 |
children | 0 |
last_payout | 2018-10-08 06:47:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 319 |
author_reputation | 7,035,336,488,338 |
root_title | "Implementing QR and Barcode scanner and converting result to PDF in PDF CONVERTER Android App" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 72,395,054 |
net_rshares | 0 |
Thank you for your review, @codingdefined! So far this week you've reviewed 1 contributions. Keep up the good work!
author | utopian-io |
---|---|
permlink | re-re-hiremani-implementing-qr-and-barcode-result-to-pdf-in-pdf-converter-android-app-1538327038296-20181001t044740346z-20181003t164040z |
category | utopian-io |
json_metadata | "{"app": "beem/0.20.1"}" |
created | 2018-10-03 16:40:42 |
last_update | 2018-10-03 16:40:42 |
depth | 2 |
children | 0 |
last_payout | 2018-10-10 16:40:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 116 |
author_reputation | 152,955,367,999,756 |
root_title | "Implementing QR and Barcode scanner and converting result to PDF in PDF CONVERTER Android App" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 72,558,126 |
net_rshares | 0 |
#### Hi @hiremani! Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation! Your post is eligible for our upvote, thanks to our collaboration with @utopian-io! **Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
author | steem-ua |
---|---|
permlink | re-implementing-qr-and-barcode-result-to-pdf-in-pdf-converter-android-app-1538327038296-20181002t031021z |
category | utopian-io |
json_metadata | "{"app": "beem/0.20.5"}" |
created | 2018-10-02 03:10:24 |
last_update | 2018-10-02 03:10:24 |
depth | 1 |
children | 0 |
last_payout | 2018-10-09 03:10:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 287 |
author_reputation | 23,214,230,978,060 |
root_title | "Implementing QR and Barcode scanner and converting result to PDF in PDF CONVERTER Android App" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 72,452,197 |
net_rshares | 0 |
Hey, @hiremani! **Thanks for contributing on Utopian**. Weβre already looking forward to your next contribution! **Get higher incentives and support Utopian.io!** Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)). **Want to chat? Join us on Discord https://discord.gg/h52nFrV.** <a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
author | utopian-io |
---|---|
permlink | re-implementing-qr-and-barcode-result-to-pdf-in-pdf-converter-android-app-1538327038296-20181003t015513z |
category | utopian-io |
json_metadata | "{"app": "beem/0.20.1"}" |
created | 2018-10-03 01:55:15 |
last_update | 2018-10-03 01:55:15 |
depth | 1 |
children | 0 |
last_payout | 2018-10-10 01:55:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.019 HBD |
curator_payout_value | 0.005 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 590 |
author_reputation | 152,955,367,999,756 |
root_title | "Implementing QR and Barcode scanner and converting result to PDF in PDF CONVERTER Android App" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 72,515,205 |
net_rshares | 13,643,831,616 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
espoem | 0 | 13,405,123,479 | 15% | ||
mops2e | 0 | 238,708,137 | 10% |