itextsharp joined pdf size too large - pdf

I have an asp.net (c#) web application.
I joined together some pdf files on serverside with itextsharp.
The result pdf is too large (>1M) to be downloaded in our environment.
I checked fonts list in Adobe Reader and Verdana font embedded 10 times. It could be a problem. I don't know why? I use iTextSharp PDFCopy for merging.
If I capture the file by fiddler and than print it out by bullzip pdf printer the size become the half (500KB)!!!
I can't figure out what bullzip pdf printer does to reduce the size???
All the joined pdfs are mosty text only a couple of small images.
Interesting when I try to copy/paste text from the original pdf I can, but I can't from the bullzip printed version (i get only rectangles when paste). That is no problem by the way because I don't need to edit or search by text, I only need to print it from the browser.
I need some .net library to do the same with the pdf before I send it to the browser.
Can anyone help me?

Related

Print to pdf that is searchable and selectable from existing pdf that is selectable and searchable

I am trying to print a section of an existing pdf to a new pdf. The original is searchable and selectable but the new pdf cannot do either. I am using "adobe acrobat reader DC" and print via "Microsoft Print to PDF". Unsure if there is any other relevant information.
After searching for a period of time I could not find an answer that allows for direct PDF to PDF print.
I did find a workaround however.
I downloaded a free software called PrimoPDF. Once installed, PrimoPDF becomes a printer option within Adobe acrobat reader. I then selected my desired pages and printed to PrimoPDf instead of Microsoft Print to PDF. This Generated a .ps file. I then imported the .ps file into PrimoPDF application and was able to generate a .pdf from that. The newly generated pdf was searchable and selectable and exactly what I needed.
Hopefully someone else finds this useful in the future.
Generally refrying (printing to PostScript then converting back to PDF) is a bad idea. The reason that Microsoft Print to PDF created a file that wasn't searchable is because when Adobe Reader detects that the printer it is targeting isn't capable of rendering the PDF correctly because of any number of reasons, like it doesn't have the right fonts for example, it will render the PDF itself and send an image to the printer. A simpler PDF probably would have worked just fine.
You are much better off getting a tool that will simply allow you to extract the pages you need to a new file rather than printing.

PDF cannot display Chinese fonts in table of contents

I made a PDF file from Latex (using TexMaker).
Acrobat Reader is able to display BOTH the text and the table of contents in Linux.
But Acrobat Reader is unable to display the table of contents in Windows XP (the Chinese characters came out as boxes). However, the text is displayed correctly.
I tried to embed the fonts into the PDF but the various methods are not 100% successful, so I'm not sure if the fonts are embedded correctly or not. Anyway, the table of contents remain unreadable in Windows.
I wonder if it is really an font embedding problem? Or do I need to install these "Adobe Reader X Font Packs":
https://www.adobe.com/support/downloads/detail.jsp?ftpID=4883
My concern is that I'd like my PDF to be readable in Windows, including the table of contents (and preferably without further installations). If this is possible...
I suspect you are talking about "bookmarks" and not saying part of the text in the document is ok and part is not. PDF Bookmarks are part of the UI of the application and are not selected from embedded fonts. Therefore, the system you are running on needs to know how to handle fonts in the language(s) of choice.
See https://forums.adobe.com/thread/1144972?start=0&tstart=0
Embedding the fonts will have no effect on the bookmarks.

Converting PDF to WMF

Can someone suggest the best way to convert a PDF file to WMF?
I currently make Dynamic XML Form PDFs with Adobe LiveCycle Designer, but a client requires the file in WMF format for printing. Instead of filling out the form directly, they have their users answer the questions within their own UI, then print the fields to the form.
I've tried converting the PDF to PNG within Acrobat then converting it to WMF, but our client is having issues with them indicating these WMFs "appear to be graphics renamed as WMFs".
Thanks
Try writing a script that prints your PDF files into a WMF/EMF virtual printer.
There a few out there, for example:
EMF Printer (GPL, not free for commercial use).
Amyuni EMF Printer Freeware, but a bit outdated (Disclaimer: I work for Amyuni Technologies).
I believe there is another one (as source code) in the Windows Driver Kit source code samples, but I cannot find the link now.

compress pdf by c# and adobe printer

One of my friend scans a lot of pages of documents and saves them as a pdf.
The size of the resulting pdf is 1GB, when I reprint this pdf using adobe pdf printer, the size of my file changes and is reduced to 80MB.
I set up Adobe Acrobat X Pro to open pdfs and Adobe Acrobat X Pro sets up a virtual pdf printer for me.
The image quality in the second pdf is very good and the most important thing is the difference in filesize.
Now how can I do this in a c# program? I want to write a piece of c# code to do this automatically.
I have about 500 pdf files and size of these files is very large and I want to reduce the size of them.
I need a c# code to get the file path and print that file using Adobe pdf printer and get a pdf file to me, or I want to be able to set a export path for the output pdf. I tested some dlls to do this.
For example iTextSharp or PDFSharp-MigraDocFoundation-1_32 or sharpPDF_2_0_Beta2_dll among many other things.
But these are not nice and working with them is not easy for me. I just want a method or class or a fast component to do these.
Please remember we wanna do this with Adobe Acrobat X Pro.
Thanks

difference between microsoft report viewer and adobe pdf reader tools?

i would like to display a pdf on my winform and am thinking of using of those tools in my vb.net application. does anyone know the difference between the two?
Microsoft Report Viewer reads report definition files and displays the report. Adobe's PDF reader displays PDF files.
Report definition files != PDF files, so you would need to make sure that you use the right tool for the right job. If you need to read PDFs, use a PDF reader.
As for consuming a PDF on a WinForm, you could host a WebBrowser control and point to the PDF. Alternately, there are several WinForm control manufacturers that read and display a PDF file (though I've not used any of them so would not be able to recommend one over another). Examples would be:
http://www.tallcomponents.com/
http://www.skysof.com/