Setting Letter Size in FPDF - fpdf

I want to set my FPDF paper size to 8.5 X 13 that almost the same with MS Office Word paper size. Right now I' using the following codes below.
$pdf= new PDF('P','mm','A4');
How could I set my paper size the same with that?

You can also use millimeter. You just need to convert 8.5 x 13 inch into millimeter.
You can also open MS Office Word, open word options then click on advanced. Then change the measurement unit to millimeters to see the millimeter size of the paper in MS office Word then use the size in the measurement of the following paper sizes.
$pdf= new PDF('P','mm',array(215.9,279.4));

The fpdf documentation shows that you need an array() to set custom dimensions:
$pdf = new PDF('P','in',array(8.5,13))

Related

How to preserve font size of plots during report generation in MATLAB?

Is there a way to preserve font size in plots when using report generation?
I update the fontsize of figures to 14 before making a report but the following instructions in Matlab during reporting create a temporary snapshot with the default font size of 12.
figReporter = Figure("Source",figure(n),"SnapshotFormat","png");
imgPath = getSnapshotImage(figReporter,rpt);
Can anyone suggest how to approach this and generate reports with the updated font size in plots?
The plots below show the difference before and after the report generation. The font size reduces when checked in the report generated.

How to get rid of the vertical line in SAP Crystal report

​I am not sure how to get rid of this vertical line? is it in the margin?
and when I click the Design Tab, the page is not in full screen
The line indicates a page break when printing. Your report is designed to print on paper that is either A2 or ANSI C in size, likely with landscape orientation.
First you need to determine what size paper this report is intended to use when printing. Then go to File > Page Setup in your Crystal Report designer and configure the Printer Options and Page Options. Printer Options should either be set to No Printer, or the printer that can print the paper size you plan to use. Page Options will define the paper size, orientation and margins.
If you plan to use a paper size that is smaller than 22 inches in width, you will need to reduce the size of the objects in your report to fit the size of the paper or allow it to span multiple pages.

How to set max height of a picture in crystal report?

Is it possible to set maximal height of a picture in crystal report and preserve original ratio of a picture?
If can grow is disabled, every picture is streched or shrinked to default picture object size, if is enabled, I'm losing limits of picture size.
I'm using crystal reports for VS 2013 (13.0.5)
Actually I solved this problem for Visual Basic 5.0 and Crystal Reports 6.0 (Seagate version). You asked the newer version but maybe this gives you an idea to solve the problem or it may help some other guys searching an answer for their problems.
Before you assign the report source you can change the height of the picture:
Set crxFieldObject = Report.Sections.Item("D").ReportObjects.Item(269)
crxFieldObject.Height = theNewHeight
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
PS: After you assign the report source you can not change the height property. Below code does NOT work:
Private Sub Section3_Format(ByVal pFormattingInfo As Object)
Picture1.Height = theNewHeight 'this code does NOT work
End Sub
In this code:
.Sections.Item("D")means the Detail Section of the report and
.Item(269) means the Picture Object. After you insert an OLE Object you can check the item number with a small code such as:
aa = Report.Sections.Item("D").ReportObjects.Count
For i = 1 To aa
Set crxFieldObject = Report.Sections.Item("D").ReportObjects.Item(i)
bb = crxFieldObject.Name
If Mid(bb, 1, 7) = "Picture" Then
crxFieldObject.suppress = False 'You can put a BreakPoint here to check the value of i
End If
Next i
Hope it helps
The answer is No. I did many tests and researches and I didn't found any way to control the height and, without controlling the height, it's not possible to fit an arbitrary image in the object box and keep is ratio at the same time.
Looks like it's and old problem.
But if all your images are limited to the same dimensions, like you have set your limits to 500x500, so you can have, for example, images that do 500x200, 500x500, 250x500, etc., there's a way to do it.
The object box needs to have the same ratio as your limits. In my example, 500x500, the ratio is 1:1 (square) so your object box needs to be square also. You need to check Can grow and, in the Image tab, set the size exactly like the object box's size. You also have to set the bitmap image size (right-click on the box, choose Bitmap Image Object then Modify) to the image limits (500x500).
Perhaps too late, but when you right click on picture -> shaping of the object
You've a checkbox "modular size", uncheck it and put manually the size you want on Image tab.

Image sizing issues (not fitting proportionally)

I created a 8.5x11.0 inches image # a 300dpi setting in photoshop.
When i go to use this as a background image in report designer the image looks hugeee.
It's not fitting within the 8.5x11.0 page.
Is there a way to resize this image correctly so that it will fit correctly within a 8.5x11.0 letter size page?
Thanks in advance,
with the information you gave, i believe your problem is problably in the group Size/dpi
You saved an image of size 8,5 x 11 inches # 300 Dpi (dots per inch) that calculates to aproximately an image of 2550 x 3300 pixels.
Now if your "report designer" software looks only at the size in pixels and assumes a dpi value diferent then the one you used, say for example 72 dpi, your 2550 x 3300 pixels image would actually be something like 45,8 x 35.4 inches.
So, my advice is, find out what are the characteristics your solftware is especting, aparently it is not 300dpi.
If you can´t find the information, try commonly used dpis like 72dpi or 150dpi.

Exporting A4 report creates Letter or A3 paper size when exporting to MS Word

I have a simple report created in BIDS 2008 and deployed to a SSRS 2008 server. It has the following report properties:
page unit: Centimeters
page size:
Orientasion: Landscape
paper sise: A4
width : 29,7cm
Height: 21cm
all margins are 2,5cm
Showing and printing this report works fine on a A4 paper. Exporting to different formats works great as well, except the format I made the report for. The Word files end up with an Letter paper size or A3 size.
Does anyone have a solution for this problem?
It could be that the body width plus 5 cm (left margin plus right margin) was interpreted as being too big for A4 and so was upgraded to the next size larger (A3.) I've seen this sort of thing happen with formatting (the infamous "blank" pages in the report when viewing in print layout or exported layout) when the paper size is set to be smaller than the right margin plus the left margin plus the body width. Seems a lot of people are not even aware that the body of the report has its own sizing. Hope this helps someone out there.