I have multiple images in the column portion of a matrix that displays the image if there is one. If there is not an image defined for the image number, the report correctly hides the image (as the BorderColor = Black is not shown) but the white space still remains.
I have tried every possible combination (except the correct one obviously) to no avail.
My objective is to only have the width of the 8 images be 2
Any Ideas?...And splitting the images into individual lines is not an option as it negates the whole premise of using the Matrix.
I have tried placing the hidden code in every possible Hidden field in the report. All postings found all refer to a SINGLE image and not MULTIPLE images.
Related
Noticed that images sometimes are sliced up in PDFs.
Steps:
insert an image with a high resoultion (3000x1800) into a .docx
use "Microsoft Print to PDF" option of Word to convert to PDF
extracting all images with pdfimages or pymupdf
Result:
Image is sliced horizontally into three images
Questions:
What exactly happens in the in the transition from .docx to pdf (or in generell in the process to pdf) that makes the converter slice it up into three images instead of one?
Do the individuell XObjects of the sliced images contain information which says that these three images belong to originally one?
How do I know how the images are sliced (horizontally / vertically) and what if originally there were two images inserted into the .docx file and both of them are sliced. Can you tell if slice x belongs to original image y or z?
So, as you have found out: because the code which generates the PDF choose to do so.
The technical reasons may be various - it could be that historically there were printers which would only have so much memory, and would need to get limiterd size-images when printing, and someone at some point when writing the PDF export code present in Microsoft Office choose to apply this limit.
Anyway, technically, as put in the comments, an image in a PDF file could be composed of unlimited smaller images collated together.
Now, the second part, and your actual question: to know whether images ibn a PDF file belong together in a single original image one would need a custom extractor tool to check the geometry of all images in the document and find out which images have no margins or boundaries with others - it would not be that hard to do for well behaved files (which we can't know if MS Office generated files are: there are ways to obfuscate image positioning by making it indirectly). The metadata in the image-parts may or may not contain information that would allow one to recompose the original image: it would be up to the code generating the PDF to include this metadata or not - but the geometry can't lie in this case: if the final document presents a single image visually, it is possible to detect that when fetching the images.
I am working in R Markdown to create a PDF Output and trying to fit my outputs to a single page. I'm a bit over at the moment, and want to remove the extra white space around an image.
knitr::include_graphics(("File_Name.jpeg"))
I have tried par(mar(c(0,0,0,0)) which seemed promising based on the description here but that seems to scale the image.
I also tried using out.width but that didn't seem to impact the image at all.
Two steps resolved this for me.
First, I added the code below to the ggplot code which was creating the original graph image in a separate r script file, that I was saving and later inserting into the rmd file.
plot +
theme(plot.margin = margin(0, 0, 0, 0, "cm"))
This helped to reduce the margins but there was still an extra space at the bottom which appeared in PDF Output files between blocks.
So, Second, following the guidance in https://stackoverflow.com/questions/59640925/rmarkdown-how-to-reduce-space-between-title-block-and-start-of-body-text
I added the code below after inserting the image (right before the first set of text) to reduce the extra spacing Markdown adds between blocks.
\vspace{-5truemm}
In my post yesterday I showed a spreadsheet that I am trying to re-create:
<How to show different groups in same matrix where no parent or child relationship>
Following that post I have created an SSRS report placing multiple matrix directly underneath each other. I have placed them so that there is 0 points between each matrix. I have hidden the header row in all of the matrix's except the top one.
Unfortunately that is causing white space between each matrix where I do not want any. I want to replicate the spreadsheet from my initial post.
I have found lots of posts but only 1 where it concerned hidden matrix header rows and that did not seem to have a conclusive answer:
<hiding and removing white space of header in ssrs report>
Is there any way to get each matrix to roll up to directly underneath the matrix above so that there is no white space between them and the header is still hidden in each of the bottom matrix's?
I use Stamps.com to print shipping labels that are 2.4" wide. Stamps.com unfortunately will only generate a pdf of this size label with 4 labels on the sheet. It is not paginated, and will not print sequentially. Their template assumes you will print it out on an 8.5" x 11" label sheet and peel off from there. Four Label 8.5x`11 sheet
I want to print on a thermal, continuous roll printer which cuts each label out automatically. To have this work I need each label to be one page, and the pdf with four labels split into four cropped files of 2.4" x 8.5". Any ideas?
I have failed so far in making an action in both acrobat, and photoshop. Should I be looking into solving this programmatically outside of photoshop?
I would be inclined to do that with ImageMagick which is installed on most Linux distros and is available for OSX and Windows.
Unfortunately, you haven't provided a sensible sample image, so I'll provide a fake one. I have made the border yellow intentionally so you can see it on StackOverflow's white page layout.
Just at the command line in the Terminal, you would want to set the default density so that when ImageMagick rasterises the image it retains its quality. The [0] refers to the first page of the PDF. Then you would want to trim off the border - whatever colour it is (+/- a small fuzz factor to allow for variations in image encoding) and then tile into 4 equal horizontal strips. So, your command would be:
convert -density 240 stamps.pdf[0] fuzz 20% -trim -crop x4# f-%d.jpg
and you will get 4 files out, called f-0.jpg, f-1.jpg, f-2.jpg and f-3.jpg
I am creating a GUI containing an image using the following code:
try
Imagenamehere = imread('Imagenamehere.jpg');
axes(handles.Logo)
image(Imagenamehere)
set(gca,'xtick',[],'ytick',[])
catch
msgbox('Please download all contents from the zipped file into working directory.')
end
The image shows up but for some reason is completely coloured blue as if put through a blue filter. I don't think it would be wise to upload the image but it is a simple logo coloured black and white.
Anyone know what could be causing this?
Check the size, type (probably uint8) and range of your image. It sounds like for some reason your images are being displayed with colormap as jet (the default), and possibly also that your range is not what MATLAB expects (e.g. 0 to 1 not 0 to 255), resulting in all your values being relatively low (blue on the jet colormap).
"black and white" is just one way of interpreting an image file which contains only two colors. MATLAB makes several assumptions when you pass data into a display function like image. If you don't specify colormap and image data range, it will make a guess based off things like data type.
One possibility is that your logo file is an indexed image. In these cases you need to do:
[Imagenamehere map] = imread('Imagenamehere.jpg');
colormap(map);