printing

Linux/CUPS printing example/tutorial? [closed]

£可爱£侵袭症+ 提交于 2019-12-21 08:16:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I need to print some vector data (or to be more exact: some dots and polylines) using Linux. When I ask Google for that it shows me many tutorials and documentations - but all for end users, no programming examples. So does anybody know a good programmers HOWTO/tutorial that shows printing under Linux? Thanks!

Way to default the name of the generated XPS file?

戏子无情 提交于 2019-12-21 07:56:20
问题 If a user prints a report, and they happen to be using the Microsoft XPS printer , i would like the default the filename to something meaningful. i would have thought that the XPS printer would take the name of the print job, and use that as the default filename - but it doesn't. Is there some other, programatic, way to default the name of the generated XPS file when i print to that printer? i was thinking there might be something like: a registry key global shared memory API call like

Printing receipt ASP.NET

喜夏-厌秋 提交于 2019-12-21 06:28:48
问题 I'm currently making a project where I need to print out a receipt on a receipt printer. At the moment i'm using the CSS mechanism media=screen , media=print to indicate what to print. Problem is of course the header and footer which can't be removed, as it is client browser specific. So i'm wondering if anyone has another suggestion on how to do the printing. Preferbly without using too much IO. 回答1: Generally speaking, if you need precise control, your best bet is to have a pdf, or other

Printing the TreeView in WPF using MVVM

試著忘記壹切 提交于 2019-12-21 06:16:23
问题 I have a treeView to return my text search result from text files. <TreeView ItemsSource="{Binding FirstGeneration}" ...> <TreeView.ItemContainerStyle.../> <TreeView.ItemTemplate> <HierarchicalDataTemplate ItemsSource="{Binding Children}"> <StackPanel Orientation="Horizontal" FlowDirection="LeftToRight"> <TextBlock Text="{Binding PreExp}" /> <TextBlock Text="{Binding Exp}" FontStyle="{Binding FontStyle}" Foreground="{Binding Color}" /> <TextBlock Text="{Binding PostExp}" /> </StackPanel> <

iText direct Printing

非 Y 不嫁゛ 提交于 2019-12-21 06:09:02
问题 I am using iText to generate a pdf and write it to the file system as the following: private void createPDF() throws Exception{ com.itextpdf.text.Document doc = new com.itextpdf.text.Document(); PdfWriter docWriter = null; path = "C:\\PATH\\TO\\Desktop\\EXAMPLE_FOLDER\\" + pdfFilename; docWriter = PdfWriter.getInstance(doc, new FileOutputStream(path)); doc.addTitle("Invoice"); doc.setPageSize(PageSize.A4); doc.open(); PdfContentByte cb = docWriter.getDirectContent(); fillPDFDetails(cb); if

iText direct Printing

廉价感情. 提交于 2019-12-21 06:07:05
问题 I am using iText to generate a pdf and write it to the file system as the following: private void createPDF() throws Exception{ com.itextpdf.text.Document doc = new com.itextpdf.text.Document(); PdfWriter docWriter = null; path = "C:\\PATH\\TO\\Desktop\\EXAMPLE_FOLDER\\" + pdfFilename; docWriter = PdfWriter.getInstance(doc, new FileOutputStream(path)); doc.addTitle("Invoice"); doc.setPageSize(PageSize.A4); doc.open(); PdfContentByte cb = docWriter.getDirectContent(); fillPDFDetails(cb); if

how to save view as an image to the SD card

对着背影说爱祢 提交于 2019-12-21 06:00:43
问题 My app creates a puzzle grid using table layout, tablerows and textviews. I want a user to be able to save this grid to the SD card so that it can be printed or copied or loaded onto another device. How do you save a view so that when it's printed it will look like it does on the android screen? 来源: https://stackoverflow.com/questions/4080133/how-to-save-view-as-an-image-to-the-sd-card

Python autocomplete user input [closed]

你。 提交于 2019-12-21 05:35:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a list of teamnames. Let's say they are teamnames=["Blackpool","Blackburn","Arsenal"] In the program I ask the user which team he would like to do stuff with. I want python to autocomplete the user's input if it matches a team and print it. So if the user writes "Bla" and presses enter , the team

How to combine two strings in Fortran

无人久伴 提交于 2019-12-21 05:22:06
问题 Here's an example in python3 of what I want to do in Fortran: str1 = "Hello" str2 = " World!" print(str1 + str2) # And then the result would be "Hello World!" When I do: print "(A)", str1, str2 It puts it on a separate line. If anyone knows how to help please answer. 回答1: The literal answer to string concatenation, using the // operator, is given in another answer. Note, particularly, that you likely want to TRIM the first argument. But there is another interesting concept your question

How to print PDF in UWP without loosing quality after rasterization to PNG

谁说胖子不能爱 提交于 2019-12-21 05:16:09
问题 After some investigation of printing in UWP I've highlighted: No native way to print PDF document directly from your app without redirecting this task to Edge or other similar program. There is a way to print XAML Elements (Image for example) using PrintDocument . There is a native way to render PDF into PNG using PdfDocument class These three points gives us ability to print a PDF, but we have a problem here: After rasterization to PNG the quality of output document is quite poor.