How to remove the white margin? - prestashop

Recently, I've noticed that my theme has a white margin on the right side and I don't want it. I've posted an image so that you see what I'm talking about. Do you know whu this white stripe is there and how I can remove it?

I conducted tests with javascript capturing document sizes, tested many sizes and came to the result that less than 1260px in the blank begins to appear.
For example, with 1259px, the space 1px arm appeared. The maximum size that it achieves is about 60px. Thus, leaving the minimum size of html with 1260px, at least for me, the blank did not show up anymore.
In your theme, open global.css file, in the end of file add this line:
html{
min-width:1260px;
}

Related

create white margin around pdf document without shrinking

I've got the following problem:
I want to print a PDF file as a booklet, using Adobe Acrobat Reader (in a copy shop, they got no better printing software). Unfortunately, Adobe shrinks my file down to the printable area. Instead I want to have it printet 50%(cause it'a a booklet, every page shrinked down by half) the original size, without shrinking any further, the margins simply cut off (just the egde of some pics etc, not important, the size matters)
My idea was, to use a software to create a white margin around every page, covering the stuff in the not-printable-area. Then adobe would not shrink anything down.
Does anyone know a tool for my problem? I couldnt find one. (running on either Windows or Ubuntu)
I would prefer a command line tool, cause I got a bunch of files to print.
Or is there a way to tell adobe Reader to not shrink anything (I know it works with normal printing, just couldnt figure it out with booklet printing)
Or are there any other ideas out there?
thanks in advance
Nevermind, i found a solution:
I created a PDF template with a white margin, transparent in the middle.
Using 'pdftk' I can easily set my original file als background of my template.
Done.

Dia pdf export (windows)

I have created some flowcharts in Dia (diaw.exe 0.97.2 - Windows 7 64 bit).
Now I want to export them to pdf.
This is working alright if I use File > Page Setup > Fit to...
Problem is, Diagrams with different sizes all get zoomed differently.
My perfect scale would be 41, but when I use that, I just get a bunch of empty pages when I export them to pdf.
What "works" is if I draw a rectangle around the whole page in dia and set the line color to white, so it is not displayed. Still, the pdfs contain 3 empty pages and on the 4th page is my flowchart.
I didnt find a dia-related forum, so I hope somebody here can help me out.
It "seems" to be just because of the Page setup...
Thanks a lot,
basti
Page setup is exactly why this happens. If you didn't make any changes to your dia setup, your grid consists of grey lines and blue lines. The blue lines mark borders of a page. If you want everything to fit on one page, you have to enlarge your page until everything fits into one page.
I faced the same issues when using pdf export in dia, and it is fixed by avoiding the pdf export, and to rather use a pdf printer instead.

False dots around circles in pdf export of libreoffice draw

When i draw a small circle in LibreOffice draw and export it to pdf i get some extra dots around the circles. Especially in the upper left and lower right outer corner of the circle.
See example PDF here: https://dl.dropbox.com/u/233922/example-dots-circle.pdf
or as a Screenshot here:
You have any idea how i can get rid of this?
It is old bug and has not been fixed yet. I can reproduce it under Linux and Windows. My version: LibreOffice 4.1.0.
Create new file in LO Impress or LO Draw.
Draw ellipse (or rounded rectangle, or smile etc.).
Set line width e.g. 5mm (for better view).
Export as PDF.
I propose two workaround:
Export to MS PowerPoint and export in it :/
Print to PDF (using e.g. cups-pdf).
ad 1) You must have MS PP and you graphics may look bad.
ad 2) I use cups-pdf and PDF look very well, but:
Text is stored as bitmap graphics (small rectangles)! You can not extract text without using OCR.
You must use paper format from list (A4, A0, Letter etc.). If you use unstandardised paper format you must use bigger format and you get white bars on PDF. However you can use pdfcrop and remove white bars.
PDF is always orienter horizontally. If you print as vertically you can rotate pdf using pdf270 command line tool.
In Adobe Reader (version 11 at least) -> Go to "Preferences" => "Page Display" => uncheck "Enhance thin lines"
Libre Office seems to add dots of 0 size and practically no visibility. When "Enhance thin lines" is checked, Adobe Reader will make these dots visible.
Best wishes,
Patrick
Similar to the https://stackoverflow.com/users/1797782/dzwiedziu-nkg 's answer, I need a multi-step process to fix this issue.
Steps:
Open the file in a pdf viewer (Document Viewer for me in Ubuntu.)
Print the pdf to a file (also a pdf) from the viewer. I assume this also uses cups-pdf, as it modifies the image size. (I don't mind, because I use the next step to eliminate all margins anyways.)
Use pdfcrop to remove all the extra space around the actual content's bounding box. If you just give pdfcrop one argument, it doesn't overwrite the old file, so use the same argument twice:
$ pdfcrop monkey.pdf monkey.pdf
Another "workaround" that worked for me:
Go without outline. You can set the line style in Draw to "none" and just work with flat solid objects.
PS: I see these dots also in Draw, not just in the exported pdf.
A simple workaround is to "patch" the dot in Libreoffice Draw using a white object -- say, a square with white area and white outline. Note that you can not see the dot in Draw. So you first generate the pdf with the orginal drawing, see where the dot appears in the pdf, go back to Draw, and a add a white patch where it is required.
Searching for a workaround myself, I've found this awk script called odg2epsfix that will fix the exported EPS to not contain those ghost dots anymore.
I stumbled upon it in this launchpad bug entry.
Fixed in LibreOffice pre-export.
Steps:
Right click on the circle in LibreOffice and select "Line"
On the "Line" page, set "Corner Style" to "-none-"
Save document and Export as PDF.
The dot is gone without removing line enhance. Mine still shows in preview but doesn't print.
The bug is still present in LO 6.0. But if you set "Cap style" to "flat" in the "Line" tab of the "Graphic Styles", the dots disappear from the screen and from the exported pdf.

SSRS05 A one page report in preview shows a second page with only footer in print layout

I have a user sign off report where it shows a users rights/access to the system which all fits nicely onto one page when I hit preview. However when I then go to print layout it shows me two pages with the second page only containg the footer.
Any ideas please?
Are you sure the page size matches the paper size?
If so, have you tried setting the page footer's PrintOnLastPage property to false? Then again, if you really need that footer to be there (seeing that there's only one page), you might have to try fiddling with the margins to get it to fit within the first page.
The report size at design time, plus the margins must be less than the paper size. Sometimes you can have a report that is too wide that is essentially generating a blank page "to the right" rather than underneath the first page.
Yes I have scrunched it all up so that it is WELL within the page size and I have tried all combinations of Footers (and headers).
It is a slightly wierd report in that it has fields that need to grow to show all the information and a small table too, but even at full growth the data looks like it fits on one page (in preview in Visual Studio) but as soon as it goes to print preview and printing it reverts to two pages.
Make sure you do not have extra area to the right of the last field of the report.
Are you sure you've adjusted the report's display size in the property sheet, too?
Hope this helps,
Bill

How to get rid of blank pages in PDF exported from SSRS

I have a two-page SSRS report. When I exported it to PDF it was taking 4 pages due to its width, where the 2nd and 4th pages were displaying one of my fields from the table. I tried to set the layout size in report properties as width=18in and height =8.5in.
It gave me the whole table in a single page of PDF, but I am still getting the 2nd and 4th pages blank.
Is the way I am doing it incorrect? How else can I get rid of those blank pages?
In BIDS or SSDT-BI, do the following:
Click on Report > Report Properties > Layout tab (Page Setup tab in SSDT-BI)
Make a note of the values for Page width, Left margin, Right margin
Close and go back to the design surface
In the Properties window, select Body
Click the + symbol to expand the Size node
Make a note of the value for Width
To render in PDF correctly Body Width + Left margin + Right margin must be less than or equal to Page width. When you see blank pages being rendered it is almost always because the body width plus margins is greater than the page width.
Remember: (Body Width + Left margin + Right margin) <= (Page width)
Another thing to try is to set the report property called ConsumeContainerWhitespace to True (the default is false). That's how it got resolved for me.
After hours of struggling with this problem, I stumbled upon a solution that worked for me:
In SSDT (2012), I had originally had my Page Setup/Page units set to Centimeters. When I changed this to Inches, strangely enough, I was able to export my report to PDF without having every other page be blank.
It is better to do this on the design surface (Visual Studio 2012 is shown but can be done in other versions) first before calculating any maths when editing an SSRS document.
Below the following numbers in red circles that map to these following steps:
In the design surface, sometimes the editor will create a page which is larger than the actual controls; hence the ghost area being printed.
Resize to the controls. Visually look at the width/height and see if you can't bring in the page on the design surface to size it to the space actually needed by the controls and no more.
Then try to create a PDF and see if that fixes it.
If #3 does not resolve the issue, then there are controls requiring too much of the actual page size and going over in either length/width. So one will need to make the size of the controls smaller to accommodate a smaller page size.
Also in some circumstances one can just change a property of the report page by setting ConsumeContainerWhitespace to true to automatically consume the spaces.
The problem for me was that SSRS purposely treats your white space as if you intend it be honored:
As well as white space, make sure there is no right margin.
If the pages are blank coming from SSRS, you need to tweak your report layout. This will be far more efficient than running the output through and post process to repair the side effects of a layout problem.
SSRS is very finicky when it comes to pushing the boundaries of the margins. It is easy to accidentally widen/lengthen the report just by adjusting text box or other control on the report. Check the width and height property of the report surface carefully and squeeze them as much as possible. Watch out for large headers and footers.
I have worked with SSRS for over 10 years and the answers above are the go to answers. BUT. If nothing works, and you are completely stuffed....remove items from the report until the problem goes away. Once you have identified which row or report item is causing the problem, put it inside a rectangle container. That's it. Has helped us many many times! Extra pages are mostly caused by report items flowing over the right margin. When all else fails, putting things inside a rectangle or an empty rectangle to the right of an item, can stop this from happening. Good luck out there!
In addition to the margins, the most common issue by far, I have also seen two additional possibilities:
Using + to concatenate text. You should use & instead.
Text overflowing the width of the specified textbox. So if your textbox only holds 30 characters and you try to cram 300 in there, you might end up with extra pages.
Have you tried to see if there is any white space on the right of your report? If so you can drag it back to the end of your report and then drag the report background back to the same spot.
On the properties tab of the report (myReport.rdlc), change the "Keep Together" attribute to False. I've been struggling with this issue for a while and this seems to have solved my issue.
I recently inherited a report that I needed to make a few changes. After following all the recommendations above, it did not help. The report historically had this extra page, and nobody could figure out why.
I right clicked on the tablix and selected properties. There was a checkbox checked that said add a page break after. After removing this, it prints on one page now.
I fixed this issue by doing the following. ( Using the latest version of Report Builder )
Step 1.) Go to View Tab
Step 2.) Check the Properties checkbox
Step 3.) Click inside the body of your report (it will update values in properties tab)
Step 4.) Take not of the width here
Step 5.) Right click in the gray area outside the report and click report properties
Step 6.) Add your left + right margin to your body width ( if that equals 10 then make your width 11)
Step 7.) Save
If your report includes a subreport, the width of the subreport could push the boundaries of the body if subreport and hierarchy are allowed to grow.
I had a similar problem arise with a subreport that could be placed in a cell (spanning 2 columns). It looked like the span could contain it in the designer and it rendered fine in a winform or a browser and, originally, it could generate printer output (or pdf file) without spilling over onto excess pages.
Then, after changing some other column widths (and without exceeding the body width plus margins), the winform and browser renderings looked still looked fine but when the output (printer or pdf) was generated, it grew past the margins and wrote the right side of each page as a 2nd (4th, etc.) page. I could eliminate my problem by increasing colspan where the subreport was placed.
Whether or not you're using subreports, if you have page spillover and your body design fits within the margins of the page, look for something allowed to grow that pushes the width of the body out.
Make sure the designer in visual studio is not going beyond your max width. Hover over the right page border and drag to the left to make sure the page does not go over your desired layout.
I just reduced all elements Width shorter than 8 inch and it is being corrected,
I did that with mouse,
your report Body should be shorter than 8 inch.
I've successfully used pdftk to remove pages I didn't want/need in pdfs. You can download the program here
You might try something like the following. Taken from here under examples
Remove 'page 13' from in1.pdf to create out1.pdf
pdftk in.pdf cat 1-12 14-end output out1.pdf
or:
pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf