I have a PDF document and I want to know if there is a way that I can embed print setting into it - such as Page sizing to Actual size and print on both sides.
So when people print the PDF they don't need to change the print settings manually.
Parts of this can be done with the "Viewer Preferences" dictionary (see PDF 1.7 specification section 12.2 for details):
PrintArea
PrintClip
PrintScaling
Duplex
PickTrayByPDFSize
PrintPageRange
NumCopies
However, as usual this depends on the PDF viewer actually using these options. So you might wanna try this out with the PDF viewers your clients use.
Related
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.
I am generating invoices with TCPDF and everything is working fine. The pdf files need to be printed onto letterhead paper. I couldn't find any information on this, but is it possible to set a "letterhead" paper type in the pdf document so that when printed it will automatically choose the tray with letterhead paper (of course, the printer has the ability to set what kind of paper is in which tray)?
If you have a look at the examples provided on the TCPDF website, there seems to be a few things there about page preferences and a possible solution to your tray problem.
Have a look at:
Print Preferences
and
Advanced Page Settings
Seems pretty interesting, looks like there maybe some built in functions that will automatically choose the tray based on the size of the PDF.
Hope this helps, good luck.
I have an issue printing pdf file in applet. I got input from http and the stream is consutructed using the pdfstamper. The problem is that i want to send the resulted stream to printer, but i did not find how to do that.
UNless the printer supports PDF you cannot send it directly to the printer. You need to rasterize it. I wrote a blog article on printing PDFs from Java at http://www.jpedal.org/PDFblog/2010/01/printing-pdf-files-from-java/
PDFBox might manage it. I'm not aware of any other Java-specific PDF renderers out there, though I wouldn't be shocked to find there's a couple more out there.
Basically, any app that can convert a PDF to an image can probably act as a print driver.
GhostScript perhaps?
Is it possible to write some text in a PDF (more specifically a link), that will not be printed when sent to a printer, but only be shown in a screen reader?
If it's possible then any pointers to PDF writing .NET libraries that might have this as a feature is very welcome.
There are at least two ways to achieve such an effect with PDF:
put the link or any element you do not want to print on a separate layer (in PDF spec lingo: "optional content") and set this layer as non-printable;
put the link into the PDF as an "annotation" and set this annotation as non-printable.
I have looked for weeks and I keep hitting dead ends. I know you can create a text or image link and tell it to "print page" in a browser. But so far, I can't get it to print a document, specifically a pdf. I would like the print dialog to show after the link is clicked and yes, the pdf linked to has been printed.
Why does this seem to be such an impossible feat? I have seen it work in a Flash movie, but since I cannot access the native file I cannot see how it was done.
Any advice?
Thanks.
Many of today's printers support direct PDF printing. Lexmark, HP, Xerox to name a few all have this on most of the 'business' printers. On these devices simply sending the PDF file directly to the device over LPR, port 9100, or some other mechanism will result in a printed document. Some devices even support URLs. I do know that Lexmark had some devices that a URL could be sent to the printer as as long as it had access to the URL it would pull the document and print. In this case it supported basic HTML, JPEG, TIF, and PDF.
Hope this helps.
A PDF must be rendered as an image before it can be printed. Usually when you're printing a PDF file on your desktop you could simply right-click on the file and select Print and if you have Adobe Reader or an alternative application set as your default PDF viewer, then the PDF that you have selected will be opened automatically -- at this stage the PDF is rendered as an image -- and then the printing process will begin.
But if there is no access to a PDF viewer that can render the PDF and then print it, then you won't be able to print the PDF. Usually if you have Adobe Reader, Foxit Reader, etc, installed then when you click on a URL to a PDF then the PDF will open within the PDF viewer within the browser and you will be able to print it.
Alternatively, you could find a PDF SDK that silently renders a PDF as an image and then sends that to the printer, without the need to have a PDF viewer installed on your machine.