Print EPS into PDF in .Net4.5 - imagemagick

I am developing a winform application with .Net 4.5 framework. I am able to create a PDF file, but unable to print an EPS format drawing onto PDF. I have tried the following-
Itextsharp,ghostwriter,LibreOffice,Latex ,epstopdf,PStill,ASPOSE ,spire.pdf, imagemagick, imageglue
In all this either they don't support EPS format or dll is not available. Can anybody guide for a full proof method to do this or if anyone have been successful in such an activity?[I don't want to convert it to JPG(tried it) as it degrades the picture quality]

Related

Draw signature over PDF file

I have an app in which some PDF files are downloaded and my problem is simple : I need to have the ability to sign them (drawing signature on screen) anywhere and save it to PDF format without modifying the structure of my PDF file.
The new feature in iOS 9 : Markup in the mail app does EXACTLY what I need. However, I don't want to use Mail in my app...
I've found on the web some ways to Generate PDF content, but very few examples and nothing that could help me with my problem.
Opening a PDF, turning it into NSData, create a context to render the signature then render both the PDF and the layered signature to finally save the NSData to PDF seems to be a pain, isn't it ?
Can someone help me either
Use markup features without using mail app or use it as transparent as possible for the user
Or, any reliable tutorial to draw signature over PDF without using a third-party app ?
Thank you,

PDF add stamp annotation from image

I have very specific task in Delphi 2010 with PDF. After some days fight I want to ask your help.
Task:
open pdf in embedded viewer component on a form
define a rectangle with mouse on the document
add into the rectangle stamp annotation from image file (BMP or PNG or JPG). The image must be stretched to the selected rect.
I try to use next components:
Acrobat Reader ActiveX (TAcroPDF)
Gnostice PDF Toolkit
Debenu PDF library
At the moment I have crazy mix of problems.
Acrobat can show PDF and can show annotations but has a methods to select a rectangle and to add a stamp from an image file.
Gnostice can show PDF, can select a rectangle BUT can not add annotation from image file and can not read all new 1.7 PDF files.
Debenu has no viewer but can read all files, can add a stamp fro image file.
Now I have almoust working solution with using all 3 libraries (each for own part of the task).
But some times acrobat library (or any other) raises exception like "can not save file" and other ones. I killed all concurence for processed PDF file (at one moment only one component exists, all other is destroyed).
The main question is not to help to kill the exceptions... But show me a way or library to solve the task. Maybe exist a PDF library for Delphi which I do not know... and this wonderful library can solve the task.
Thanks.
I would suggest not using TAcroPDF all together.
please see this post: TAcroPDF loses resolution after form has resized.
furthermore:
Debenu PDF library can render, modify and save PDF files as an Image - if you simply just have to show the user a preview - using debenu - create a temporary image file and show it in a TImage - Then use the rest of the Library to save the actual .PDF or do whatever you need to.

Opening a TIFF File from the Web Browser

I checked previous questions here on SO but I think I want my functionality to work a little different. I understand that .tif files are not natively supported in Internet Explorer and that an extension, such as AlternaTIFF, are available to remedy this. However, I would like the dialog to show up where the user can either save/open the file on the client side. I know that MS Windows Picture and Fax Viewer can open them, no problems.
The files are located on our servers and this will be an intranet site. Currently, I have a link to the files populate in the view but again, I'd like that option for the user to Save/Open the file.
I'm using MVC, which I'm a little unfamiliar with, and can't seem to figure this one out. Thank you.
You can do an action that returns a tiff by changing the headers so when someone clicks the link the file will get downloaded or using FileResult.
Example with FileResult (i find it easier): http://www.dotnetcurry.com/ShowArticle.aspx?ID=807
For saving them is just like uploading any file with MVC. This post can be useful http://haacked.com/archive/2010/07/16/uploading-files-with-aspnetmvc.aspx
My advice is that you convert them to .jpg or .png when uploaded using GDI+.
//You first upload the tiff to the server like the post above explains
//And then open and convert it to .JPEG
Bitmap bm = Bitmap.FromFile("mypic.tiff");
bm.Save("mypic.jpg",ImageFormat.JPEG);
And if you already have the urls of all the tiffs, you can always do a console app to convert all of them. Even if you need to use tiffs its a good idea to have .jpg versions to show on the web. You can even resize them to create previews and save some bandwith too! :-)

Is it possible to display a PDF in a Report Builder report?

We use report builder to generate reports on our software developed with Delphi 2010. I have a lot of reports that display an image, but:
Is it possible to display a PDF in a report builder report just like we display a JPG?
One of our customers wants to display PDFs that contains only a single page with an image (dont ask me why he did not save it as JPG). But the problem is, he has a lot of pdfs that he does not want to convert.
It is possible IF you convert the PDF to another image format.
refer to how to convert PDF to BMP/PNG/JPG etc etc
or check out http://wiki.freepascal.org/PascalMagick

ImageMagick create PDF version 1.4 from image?

I know that I can use ImageMagick's convert tool to turn different image files into PDF documents. However, is there some way to specify what version of PDF document I want to use for the output? Can I convert an image to a PDF v1.4 document?
I am trying to find a way to automate the conversion of image files (probably SVG) to PDF files that need to be sent to a printing service. The printer's service requires the PDF files to meet certain requirements, and one of them is that the PDF file is v1.4. My version of convert is "6.5.7-8 2010-12-02 Q16".
Thanks,
Carl
This question on superuser.com
https://superuser.com/questions/193791/batch-convert-pdf-versions
will give you some hints how to change the version number in the PDF afterwards.

Resources