Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "pdf conversion"
-
It's done! Network printer and scanner, hosted by a Raspberry Pi Zero W. I used CUPS to host the printer, but the scanner was much more difficult. I installed apache2 on the Pi to host a HTML front-end that I wrote. Once you set up the scan, the front-end makes an AJAX call to a PHP script, which then calls my Python script that does the scanning and converting. Once that's done, it returns the file name via the AJAX call, then the front-end downloads the scanned PDF on the computer. I even managed to impress my girlfriend, who didn't really understand what I was doing until I showed her the end result 😄
I might try to pipe the output of the conversion straight back via AJAX, to be downloaded without a second call.9 -
I once had a client who wanted a system where no matter what type of file someone uploaded we'd make a PDF out of it. I don't mean "print to PDF", I mean like a straight conversion. A picture, a doc file, a speadsheet, an MP3, a video, a CAD file, a .ivt file format you and I make up right now and tell no one else about for storing Iowan votes, anything.
I told him that was impossible.* There are indeed things out there where you can print to a pdf, but it would mean that a program that knows what a .grml file is, and how to represent it on paper, assuming it even can be, is involved in the middle.
He refused to believe me, and found a company where the sales person swore up and down their product could do it. I said "then you explained it wrong" and we went back and forth. It culminated in me being put in contact with THEIR programmer. I explained what he was looking for. Their programmer replied along the lines of "but that's impossible, and also what would a PDF of half these examples even look like?" I basically said "I know, but your guy is telling my guy you can do this, so you need to tell your guy to STFU before we ALL get roped into trying to convert Duke Nukem maps and zip files full of dlls to pdfs."
Luckily it finally died after that, but the whole ordeal took months.
*I'm being direct/blunt for the sake of brevity when recapping what I said, just fill in the usual "talking with a client niceties"12 -
Why Pdf is a new religion:
Pdf is complicated.
Pdf is ubiquitous.
Everyone follows their own conventions and calls it a standardised pdf.
Conversion from pdf to any other format is problematic.
Keep adding to the list...8 -
Client:
"Ok,. so your saying that its gonna take you 63 hrs to create a simplified CRM with basic functionality and auto fill docs or automated work flow docs as an added feature?"
My response (after already under-quoting and planning on cutting some corners because he has a smaller budget than normally necessary):
"It sounds simpler than it is. There are a lot of things I need to take into account that you wouldn't even think about.
For instance:
Making sure your emails don't go to the client's spam folder. This requires the sending domain to be verified via DNS settings. I have to ensure your email content passes a spam test (link to text ratio needs to be good). I assumed you'd want an email that has your logo and looks good. This means testing the design in Outlook to make sure it's not broken.
What if the email doesn't send due to an invalid email address, or bounces back? You'll need to be notified.
What if the client list for the week contains duplicates? You need them merged or ignored.
Generating a PDF from HTML can be tricky because the conversion isn't apples to apples so there are things I need to adjust to make them as close as possible.
Making a site completely mobile friendly (the tier 3 option) can be very time consuming as well. It's not about whether or not it fits on a mobile phone, it's about whether or not it's intuitive and useful. You're essentially getting a mobile app without paying for separate development of an app.
If I took everything into consideration and built this to be 100% bullet proof, it would cost tens of thousands.
I'm doing my best to leverage your needs with the probability of running into an issue. I'm not going waste my time/your money on something that will likely never happen."9 -
TL;DR, I do node.js now.
__________________
There's much I was working on the past weeks. First of all some of you may know I don't work in IT and therefore always am learning how to make things easier in my workspace with tech. And my boss once told me how annoyed he is converting stuff to PDF for easier sending via mail.
Then I started to build PDF converter with
PHP and the Laravel framework. My first steps into it succeeded and I could even deploy my Pdf-wizard website, but everything feels like a hustle and making this application bigger don't really seems like a enjoyable task for me.
I tried the same stuff with Node.js then. It was damn good. It was simple, because there are plenty of packages wich do this tasks on NPM. Afterwards I spent some time on doing research and ended up learning Express Framework.
This brought new inspiration to me and I wanted to share this with you guys.1 -
I really enjoy my old Kindle Touch rather than reading long pdf's on a tablet or desktop. The Kindle is much easier on my eyes plus some of my pdf's are critical documents needed to recover business processes and systems. During a power outage a tablet might only last a couple of days even with backup power supplies, whereas my Kindle is good for at least 2 weeks of strong use.
Ok, to get a pdf on a Kindle is simple - just email the document to your Kindle email address listed in your Amazon –Settings – Digital Content – Devices - Email. It will be <<something>>@kindle.com.
But there is a major usability problem reading pdf's on a Kindle. The font size is super tiny and you do not have font control as you do with a .MOBI (Kindle) file. You can enlarge the document but the formatting will be off the small Kindle screen. Many people just advise to not read pdf's on a Kindle. devRanters never give up and fortunately there are some really cool solutions to make pdf's verrrrry readable and enjoyable on a Kindle
There are a few cloud pdf- to-.MOBI conversion solutions but I had no intention of using a third party site my security sensitive business content. Also, in my testing of sample pdf's the formatting of the .MOBI file was good but certainly not great.
So here are a couple option I discovered that I find useful:
Solution 1) Very easy. Simply email the pdf file to your Kindle and put 'convert' in the subject line. Amazon will convert the pdf to .MOBI and queue it up to synch the next time you are on wireless. The final e-book .MOBI version of the pdf is readable and has all of the .MOBI options available to you including the ability for you to resize fonts and maintain document flow to properly fit the Kindle screen. Unfortunately, for my requirements it did not measure-up to Solution 2 below which I found much more powerful.
Solution 2) Very Powerful. This solution takes under a minute to convert a pdf to .MOBI and the small effort provides incredible benefits to fine tune the final .MOBI book. You can even brand it with your company information and add custom search tags. In addition, it can be used for many additional input and output files including ePub which is used by many other e-reader devices including The Nook.
The free product I use is Calibre. Lots of options and fine control over documents. I download it from calibre-ebook.com. Nice UI. Very easy to import various types of documents and output to many other types of formats such as .MOBI, ePub, DocX, RTF, Zip and many more. It is a very powerful program. I played with various Calibre options and emailed the formatted .MOBI files to my Kindle. The new files automatically synched to the Kindle when I was wireless in seconds. Calibre did a great job!!
The formatting was 99.5% perfect for the great majority of pdf’s I converted and now happily read on my Kindle. Calibre even has a built-in heuristic option you can try that enables it to figure out how to improve the formatting of the raw pdf. By default it is not enabled. A few of the wider tables in my business continuity plans I have to scroll on the limited Kindle screen but I was able to minimize that by sizing the fonts and controlling the source document parameters.
Now any pdf or other types of documents can be enjoyed on a light, cheap, super power efficient e-reader. Let me know if this info helped you in any way.4 -
Currently working on thesis:
Me:(Using iText to convert PDF Files to String)
Groupmate: I think the conversion makes our program slower.
M: Fine, I'll search for other libraries
M:(Finds Apache PDF Box and another open source PDF Util)
M:(Tests using nanotime then converted to seconds)
PDFBox: 24.3464 seconds
PDFUtil : 20.8365 seconds
iText : 7.937 seconds
://///// -
From the last 3 years, i have accumulated interest and experience in android dev. Not sure about the future, but that's probably where i will be.
But this fact is moot to our 50 year old grumpy professors teaching 1000 year old rusted computer syllabus, who rejected my idea of a video streaming app as major project, simply because i projected it as a social media app, and "everyone is making a social media app, its such an old topic". yeah right sir, its younger than your daughter that fucks in the lobby
Now we are doing a project on file conversions website, a project suggested by my team member and my good friend. its such a shitty topic, there is no resources available, even the research papers are bad , every search points to a shitty site, and i don't know shit about web dev.
Technically i am the team leader, but my team mate won't let me make the project as android native app, because "Brooo, i am going to make a react app that would be completely offline, completely client side, full secure and shitt small" and sometimes "Bro its my idea" .
Well, 1. the whole point of client side is stupid because the 18 mb jsfile isn't going to get downloaded first in the client's cache(or whatever the process is, idk). The top stack overflow answers i saw told me to buy an ec2 instance and run liberoffice commands on it for every request, and that's SERVER SIDE. even if we could, i am sure its going to be bigger than what i would have made in kotlin.
2. what am i supposed to do? look at you coding while make all the ppts and research paper? you are going to use undocumented libs that "just works" , and i am suppose to curate the theory behind this, looking at all the researches of the world?well i guess okay that's a light job since THERE AREN'T ANY.
And we are targetting all types of conversions, nice. from what i know, handbrake.fr: video conversion s/w = 16 mb. photoshop: image conversion s/w=1gb and ms word: doc to pdf/other formats= 500mb.
Plus all those proprietary and undocumented formats, ugh. Thank you ugly ass companies.
Internet is great but web dev has become a whole lot mess. "I am going to build a software that is going to run in your system only using your device's processor" is a desktop/mobile app, not a website -
I do not like it but I am forced to ask a tech question because my friend google has no idea how to solve this problem...
So, I have a pdf with a bunch of points with a number inside. I have to produce a list of numbers with X and Y coordinate of the point.
What I have tried: convert pdf to HTML and extract the position of divs / completely failed because a lot of points were distorted, mixed up, contained more numbers, etc, it's just not precise enough after conversion.11