I've used a third party library (iText) to create a PDF file on Windows Mobile 6.5, but it does not appear to support printing the resulting PDF. Can anyone recommend a way to print a saved PDF file from the mobile device?
I've searched the net and I'm failing miserably to locate a SDK that will let me do this. The application is written in C#.
Have a look at this 3rd party library http://www.fieldsoftware.com/PrinterCE_NetCF.htm .
Not sure it can be used to print a PDF, but you can use the library to print directly on a selection of printers. Do you need the PDF file?
Related
So i created a .net c# application that does store article codification, and also bought a Postek c168 barcode printer, and i want to create a section on my application that prints texts and images to the direct thermal labels with the printer, i also downloaded a dll file for developers on the official printer website, my question is on how to use the dll file or how to implement the printer on my application.
Downloaded SDK contains the manual for SDK functions "Postek API Manual_CDFPSK V3.01.pdf". I do not want to be sarcastic, but maybe you should start reading that document first.
My initial observation is that DLL contains some native functions that you can call over interop.
Is there a way to print PDF from UWP application? Other than rendering it as png or BitmapImage.
I had look at Microsoft printing sample and pdf rendering sample to achieve printing pdf by rendering it into bitmapimage. But, it looses the quality of the pdf. Would like to know if any other efficient method available without using libraries .
Edit(31/12/2018)
I tried to find direct solutions from Microsoft without using libraries. But, there isn't any so i used PDfSharp to solve my problem with the help of AppServiceBridge by Microsoft. I have used AppService bridge because PdfSharp isn't directly available for WinRT.
I used a virtual printer in C# using the Github project: Microsoft/Windows-driver-samples/print/XPSDrvSmpl.
https://github.com/Microsoft/Windows-driver-samples/tree/master/print/XPSDrvSmpl
Installer: http://wixtoolset.org/
Application: Listen to internal port
Flow: Install printer and application from a single installer. User prints something with your driver while the application listens to the internal port. When data is sent the application picks it up. This is for XPS, can be converted to PDF, but the flow is similar no matter what you are printing.
Original answer:
https://stackoverflow.com/a/40370083/3850405
I'd like to implement support for these types of files in my application, but for this I need something that will let me extract raw text from these filetypes.
I'm looking for either a solution that doesn't require any additional libraries, or an all-in-one library/NuGet package. I took a look at GemBox.Document but it doesn't seem to be working with UWP projects.
What would be the best option for this?
I'm looking for either a solution that doesn't require any additional libraries, or an all-in-one library/NuGet package.
There is no such package.
In the standard UWP app we can read .rtf file with the Rich edit box, there is code sample in this document shows how to edit, load, and save a Rich Text Format (.rtf) file in a RichEditBox.
For .doc, .docx, aka. MS Word document, especially the version after 2007, it uses Open-XML-SDK and currently it doesn't support UWP platform.
For .pdf documents, you can refer to #Franklin Chen's thread: [UWP]PDF Viewing on a Windows Universal App.
For epub files, it is a ZIP archive file, to parse this file, you can refer to the thread: [WP8.1][C#] How can i read an EPub file in c# on Windows Phone!?.
For mobi files, sorry I couldn't find any useful information for development for the moment, I can only now suggest to convert it to pdf file with free online service.
But in a word, since Open-XML-SDK currently doesn't support UWP platform. It is not possible to find a solution or package for standard UWP app. You can try to find such a web service and implement this service in your app, or you can use commercial libraries which can read documents in all these formats.
I want to know how I can view a PDF through a C# .net desktop App. I am trying to create a application to view PDF using visual studio 2008
There is a pdf reader libraries called iText(iTextSharp). But it didn't help me
You can host a ie web browser control in your application and that will allow the user to view a pdf if they have a reader installed.
I can provide an example if you tell me whether you are using WPF or WinForms.
Drag WebControl on to you form
Set the path in code
Done Press F5
I'm not sure what netbeans has to do with anything, but take a look at this question here How to render pdfs using C#
Essentially you need to get a 3rd party PDF viewer or write one yourself. There are quite a few around and would probably take a look at something like PDFViewForNet
iText isn't a PDF viewer.
If you want to read PDF documents in your application there are couple of Open Source PDF Libraries.
Does anyone know if the following is possible and if so what the best way of doing it is for free?
I am generating a PrintDocument in a project I am currently working on and displaying a print dialog box so a user can choose which printer they want to use etc. The is currently a windows form application and if a user wants to print to a PDF they can select to print to CutePDF or something similar.
However I am now putting a ASP.Net web frontend on the application and want to use the same code to generate the PrintDocument but want to print it to a PDF on the fly and serve it up via the Response stream in the format of a PDF download.
So my question is....How can I use the current PrintDocument and generate a PDF in memory from it??
Thanks
The System.Drawing code for a PrintDocument can be reused to generate a PDF document with ABCpdf .NET. See the System.Drawing example...
You would have to use a 3rd party component in order to generate the PDF. The following article has some links to some such components: Generating PDF Files from .Net
You're in a world of hurt if you think you're going to run the "same code" that deals with printers in both a forms app and an ASP.NET app.
You might be in luck, however, as it appears that PDFsharp + MigraDoc might be able to do this for you.
I think you will find there is not any tools that will take a PrintDocument as input and render a PDF as output. The only way to do what you want is to "print" the PrintDocument to a "PDF printer driver" that will generate PDF. Basically a virtual printer that will generate PDF instead of printing the actual output. There are a plethora of products on the market for that. A couple that are cheap and widely used are as follows:
Ghostscript with RedMon (open source/GPL or commercial licenses available)
Foxit Software's PDF Creator ($29)
You really should be looking at iTextSharp (it is mentioned on the iText.NET page recommended earlier)
http://itextsharp.sourceforge.net/
PrintDocument is meant for Windows Forms applications but is up and coming in SilverLight, see this video... http://silverlight.net/learn/videos/all/printing-api-basics/
If you wish to continue with the PrintDocument and a web application, I think SilverLight 4 (which is beta right now) is the only way to go, or your going to have to have a lite weight windows form application installed locally for the end user that maybe uses web services.
iTextSharp is a great tool for generating PDFs with .NET on the Internet. I highly recommend it; I've used iText with Java...and have been using iTextSharp for the past few years.
There are several ports of iText for .NET (A very popular open-source PDF library for Java).
http://www.ujihara.jp/iTextdotNET/en/