Ruby and PDFs - tool recommendations [closed] - ruby

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Im trying to create a board game generator in ruby which takes images from one pdf and places them them on the tiles of the board-game template pdf. One image per tile.
I'm wondering what tools would be good for this in ruby. Ive looked at prawn and that seems great for creating the board game but i don't think i can use that for extracting images from the source pdfs.
Can anyone provide any ideas?
Extra info:
Currently my knowledge of how pdfs are created and formed is v.limited so this may not make sense or matter but just in case...
The source pdfs have one image per page. I haven't created the source pdfs / images so I cant determine how the pdf was authored i.e. is the image just plain text e.g. "Take a card" or is it some fancy adobe illustrator vector.
the images will always be re-sized smaller and image quality inst a priority - as long as it looks good to average user its fine.

take a look at this thread for some ideas on reading pdfs
Ruby: Reading PDF files
For writing PDFs, I recommend http://github.com/jdpace/PDFKit, it is a nice wrapper around wkhtmltopdf. It allows you to generate html with css and create a pdf directly from it. It saves hours of time compared to trying to format everything in prawn.

Related

How to create High Quality PDF in 2021 without Adobe Acrobat? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
So I've spent the last 4 hours trying to find a way to convert this word document into a pdf that does not destroy the image quality:
https://easyupload.io/ilfsh7
Save as pdf:
Background color is lost and image quality is bad:
Print as pdf:
Page size is lost and image quality is a bit better but still bad and full of artifacts:
This post says that using pdfcreator is a good solution but it resulted in once again the loss of the page size information. The image quality was better but not good enough. I need it sharp enough for a label print.
Another thread showed how you can add options in the registry. Basically change the dpi during the conversion. As far as I can tell it did not change a thing. Image quality was still insufficient.
Do I have to buy Adobe Acrobat just to get a good image quality in my pdfs?
Adobe Online showcase their Word Plugin, so if you want to use similar offline for privacy then Just use their plugin to export from Word.
WordPad can be Command Line scripted to convert a docX to PDF but as you see will use the core content and can not respect customised formating such as the background.
WordPad can actually have a background colour but then again is not good with transparent images
However the point of this visual comment, is that scripting any other Word replacement such as LibreOffice should perform even better for personal usage.
So apparently Adobe is offering a free Online Conversion Tool which produces the best results so far. Although there are still some artifacts, the quality seems to be the best:
Edit: So adobe lets you convert 2 or so pdfs until it forces you to make a subscribtion. But I found an even better online converter that seems to produce pdfs with perfect quality:
pdf.online

Image processing to identify number of dark lines in image [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm currently working on a project to automate the reading of a type of sensor (very similar to a pregnancy test stick, see figure below). The stick is dipped in a sample and either 1 or 2 lines appear.
The sensor is then photographed and it is this image that needs to be processed. My question is: what is the best way of going about this? From what I've read about the subject the MatLab image processing toolbox is very good, but that's a little beyond my budget. Are there any free/ cheapish alternatives that would be suitable?
The ImageJ toolbox might suit you. http://en.wikipedia.org/wiki/ImageJ
This would be possible using OpenCV using Java, Python or C/C++.
OpenCV (Open Source Computer Vision Library) is an open source
computer vision and machine learning software library. OpenCV was
built to provide a common infrastructure for computer vision
applications and to accelerate the use of machine perception in the
commercial products. Being a BSD-licensed product, OpenCV makes it
easy for businesses to utilize and modify the code.
A line detector is not that difficult to write code by yourself. Search for canny edge detector and hough transform for more details. And there are also some codes written by others that are shared in mathwork exchange pages, such as :
http://www.mathworks.com/matlabcentral/fileexchange/34637-line-detection-using-hough-transform/content/try3.m
http://www.mathworks.com/matlabcentral/fileexchange/35754-wide-line-detector
If you have the jpeg or other images rather than the raw data, imageJ is also a good choice for various image processing approaches: http://rsb.info.nih.gov/ij/download.html (though imageJ can also import binary data format file)

Save for web feature in Photoshop for image size reduction [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
Save for web feature in Photoshop for image size reduction, would this be the simplest way for a beginner (like myself) to try and save on (some) loading time.
I am using images for my menu buttons, background, header, post page, etc etc
I have only just found this save for web feature and I was wondering does it really help in image size or does it not make that much difference.
Is there any other option?
(website for reference: www.kizzieskorner.com)
PS: if you mark my question down please could you give an explanation why so I know what not to do next time - as I am new to these question forums too!
Any reductions in size will help of course. I would actually recommend looking at other image optimising tools.
If you are on a mac there is ImageOptim which is part of my regular workflow now. There is also an optimiser within CodeKit.
This site has a whole host of others listed too and might give you a bit more information on the subject.
http://devstand.com/apps/compress-images-apps/
Hope this helps

making graphs with xCode [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Hi I need to graph some arrays to analyse signals, I have a cocoa project going. Can anyone tell me where I can find tools to simplify this task?
Basically i want to display my arrays like on a graphing calculator.
Even though it's a young library, I'd suggest looking at the open source Core Plot framework. It works on Mac and iPhone and can currently plot line and bar charts. As I said, it's young and a lot of the core functionality is still being written, but it might work right now for your case.
Take a look at this post to the Apple mailing lists. http://lists.apple.com/archives/scitech/2007/Jun/msg00022.html
It mentions 3 potential graphing packages that you can try. I have not had personal experience with them, so buyer beware, but it will at least give you a start on where to look.
XCode allows you to create data formatters to present object data in the debugger, but it doesn't provide any way to graphically represent the data using charts or graphs. (At least, not that I know of!) I think that's beyond the scope of XCode. You might consider dumping the data from your array to a file using a bit of code or the console, and then loading it into Excel or MATLAB. Then you can create a graph of your signal with no problem.
Just out of curiosity, are you familiar with another IDE that provides graphs of array data? I know tools like MATLAB and Mathematica do it pretty nicely, but I've never seen it in an IDE.

What is a good Graph Editor for MacOS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I need some sort of node-graph editor, that hopefully works on both Mac and other platforms, to generate user created node collections with properties. The graph data will then be used in a data-driven application I'm working on, so kudos if the application can save the graphs in some easy to process format. So far I was using XML with a tree editor, but since the graphs can be cyclic according to the requirements, the tree editor no longer cuts it.
Plugins for other applications would also be ok!
GraphViz' graph drawing software is pretty much the best there is, cross-platform, with a very simple file format and lots of output formats. It is especially good in automatically calculating a layout for graphs. A GUI for OS X is available.
Have a look at Yed (http://www.yworks.com/en/products_yed_about.html), free to use but places a logo on all output.
It comes with Mac OS binaries .. and you might be able to include ($$ required) the graphing engine it is based on into your project.
I've used it (with limited success) to document enterprise data-flows..
You might want to do something with JHotdraw (at sourceforge). It is one of the design patterns demo projects converted from Smalltalk. It is (or was before it was put on sf) very well documented and easy to extend. A similar (but less well-documented) framework is GEF in Eclipse.
You can take a look at OmniGraffle: http://www.omnigroup.com/omnigraffle

Resources