margins

How to crop PDF margins using pdftk and /MediaBox

自闭症网瘾萝莉.ら 提交于 2020-01-01 05:16:21
问题 I used pdftk to uncompress a PDF and then opened it as a text file. I want to edit the /MediaBox field, which is in my case /MediaBox [0 0 612 792] I would like to reduce the margins, for instance /MediaBox [100 0 512 792] Unfortunately it doesn't work. I can change the 0 into a 2 or a 9 but I cannot put 100 for instance. Any idea why? 回答1: use sed to replace any occurrence sed 's/MediaBox \[0 0 612 792*/MediaBox \[100 0 512 792]/g'<in.pdf >out.pdf or podofobox (inside podofo utils ) http:/

How to set margin dynamically in Android?

心已入冬 提交于 2019-12-29 19:24:35
问题 I am currently doing an android application that contains customize alert dialog. It contains a button , but i can't set the margin for the button . the code is given below. setmargin method is not working AlertDialog.Builder myDialog = new AlertDialog.Builder(Login.this); Button button = new Button(Login.this); button.setText("Send"); LayoutParams buttonLayoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); button.setLayoutParams(buttonLayoutParams);

How to set margin dynamically in Android?

纵然是瞬间 提交于 2019-12-29 19:22:57
问题 I am currently doing an android application that contains customize alert dialog. It contains a button , but i can't set the margin for the button . the code is given below. setmargin method is not working AlertDialog.Builder myDialog = new AlertDialog.Builder(Login.this); Button button = new Button(Login.this); button.setText("Send"); LayoutParams buttonLayoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); button.setLayoutParams(buttonLayoutParams);

Removing axes margins in 3D plot

守給你的承諾、 提交于 2019-12-28 05:54:09
问题 I spent last few days trying to find a way to remove tiny margins from axes in a 3D plot. I tried ax.margins(0) and ax.autoscale_view('tight') and other approaches, but these small margins are still there. In particular, I don't like that the bar histograms are elevated, i.e., their bottom is not at the zero level -- see example image. In gnuplot, I would use "set xyplane at 0". In matplotlib, since there are margins on every axis on both sides, it would be great to be able to control each of

Open XML SDK page margins

落花浮王杯 提交于 2019-12-25 06:50:02
问题 I am trying to set the page margins on an excel spreadsheet that is being generated by open xml sdk. I am not opening an excel document that already exists, it is generated from scratch. I am using the PageMargins class but am not sure how to attach this instance to the worksheet. The SDK productivity tool gives this code: PageMargins pageMargins1 = worksheet.GetFirstChild<PageMargins>(); pageMargins1.Left = 0.45D; pageMargins1.Right = 0.45D; pageMargins1.Top = 0.5D; pageMargins1.Bottom = 0

Constraints and margins in xcode 6, margins revealing whitespace after snap

允我心安 提交于 2019-12-24 11:24:30
问题 I'm trying to constrain a couple of views within a controller. I understand how to set spacing between views, and width/height for each view. I'm a little unsure about dynamic height and width, I'm assuming that it's the margin-locks duty to adjust the weight appropriately. Advice on this would be much appreciated. Anyways, I'm trying to set a "Trailing Space to: Superview" constraint, which automatically sets to -16. See photo: As you can see, I've selected margins for left right and top of

In iOS, using CGPDFDocumentRef, why is my PDF showing big margins and not the whole page? [duplicate]

断了今生、忘了曾经 提交于 2019-12-24 04:53:25
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: how to fit pdf page in entire view I am showing with no problem a PDF, however, the original PDF does not have the big margins shown at the moment I compile the App. My code: In the H File: @interface viewPDF : UIView { CGPDFDocumentRef document; } In the M file: - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:(CGRect)frame]; if (self) { self.backgroundColor = [UIColor clearColor]; NSString

vb.net 2010 PrintDocument Margins not working even if I set the margins

北城以北 提交于 2019-12-22 17:21:37
问题 I am reading from a text file and then printing the string using printdocument via vb.net 2010. Here is my code : Public Class myPrinter Friend TextToBePrinted As String Public Sub prt(ByVal text As String) Dim psize As New System.Drawing.Printing.PaperSize("Custom Paper Size", 850, 550) Dim newMargins As New System.Drawing.Printing.Margins(0, 0, 0, 0) TextToBePrinted = text Dim prn As New Printing.PrintDocument Using (prn) prn.PrinterSettings.PrinterName = frmStockOut.printer prn

vb.net 2010 PrintDocument Margins not working even if I set the margins

醉酒当歌 提交于 2019-12-22 17:20:11
问题 I am reading from a text file and then printing the string using printdocument via vb.net 2010. Here is my code : Public Class myPrinter Friend TextToBePrinted As String Public Sub prt(ByVal text As String) Dim psize As New System.Drawing.Printing.PaperSize("Custom Paper Size", 850, 550) Dim newMargins As New System.Drawing.Printing.Margins(0, 0, 0, 0) TextToBePrinted = text Dim prn As New Printing.PrintDocument Using (prn) prn.PrinterSettings.PrinterName = frmStockOut.printer prn

R: calculating margins or row & col sums for a data frame

狂风中的少年 提交于 2019-12-22 17:01:26
问题 I have a data frame that looks like this: Flag1 Flag2 Type1 Type2 Type3 1 A FIRST 2 0 0 2 A SECOND 1 9 0 3 A THIRD 3 7 0 4 A FOURTH 9 18 0 5 A FIFTH 1 22 0 6 A SIXTH 1 13 0 7 B FIRST 0 0 0 8 B SECOND 3 9 0 9 B THIRD 5 85 0 10 B FOURTH 4 96 0 11 B FIFTH 3 40 0 12 B SIXTH 0 17 0 I need to sum in such a way that my data frame finally looks like this Flag1 Flag2 Type1 Type2 Type3 Sum 1 A FIRST 2 0 0 2 2 A SECOND 1 9 0 10 3 A THIRD 3 7 0 10 4 A FOURTH 9 18 0 27 5 A FIFTH 1 22 0 23 6 A SIXTH 1 13 0