Ameba Ownd

アプリで簡単、無料ホームページ作成

grisanreli1980's Ownd

Prince pdf print scaling

2022.01.16 00:38




















The output can be controlled in several different ways, addressing different aspects of the resulting files. Prince supports tagged PDF files and optional PDF profiles, which can be selected using the --pdf-profile option on the command-line interface , or the setProfile method if using a server wrapper , or the PDF.


To enable tagged PDF without using one of the profiles that already imply it, the command-line option --tagged-pdf can be used. This can be disabled by the command-line argument --no-object-streams or from JavaScript via the PDF. Object streams are enabled by default, therefore Prince produces files with PDF version 1.


Choosing one profile over another can help producing a PDF file which has the right properties for its intended destination. Please also see the Color Management section for the impact the PDF profiles have on color management.


Prince produces error messages when the restrictions are not respected. To abort the production of a PDF file when the requirements for a specific PDF profile are not met, the --fail-pdf-profile-error command-line option from the Fail-Safe Options needs to be invoked.


Producing accessible documents is very important when documents are to be shared with a wider audience. There are several criteria that need to be addressed, summed up in the Web Content Accessibility Guidelines , often abbreviated to WCAG, a set of guidelines for improving web accessibility. The next step would be to specifically check compliance of the document's content with the requirements. A number of resoures or tools can be helpful in this step:.


Prince helps in creating accessible documents. Last but not least, there is a nice Resources page on tagged and accessible PDFs. Prince supports PDF-internal and -external links. HTML hyperlinks are automatically converted. The property -prince-pdf-link-type may be used to control the link type and target, i. Note however that the optional link target keywords same-window and new-window only affect links to local PDF files. This example is equivalent to -prince-pdf-link-type: auto new-window and has only effect for links to local files.


Prince also supports the following PDF-specific fragment identifiers, supported by web browsers, and will use them when generating links to local PDF files. The property -prince-pdf-destination is used for creating them. However, Prince passes the provided values verbatim to the PDF viewer, so the user can supply values that Prince doesn't know about, but the viewer does. Please be advised that this and the following actions and scripts are dependent on the PDF viewer, and in many cases might only work in Adobe Acrobat products.


The property -prince-pdf-open-action may be used to specify a space-separated list of actions to perform when the PDF file is opened, like eg.


Any arbitrary identifier can be specified, although these may be PDF viewer specific; Acrobat can take just about any menu item. In a similar fashion, scripts that will be executed when the PDF file is opened may be included with the -prince-pdf-script property.


A common use case is to activate the "Print" dialog automatically. To achieve the equivalent of the previous example, the following code could be used:. The property can also take the url function to reference an external JavaScript file. Is this something that could be achieved by writing a plugin and having the user install the plugin? You could ship your own viewer or plugin but it would be a lot of work and you would have to guarantee the user had to use it — mark stephens. This answer is misleading.


There is a way to embed a preference in the file to request no scaling. Most PDF applications will honour the preference and not scale the document as a result. You can have a default scaling on a page but it can also be adjusted by the user and by actions in the PDF. Viewers like Acrobat also allow multiple print options and views. Robbt Robbt 21 1 1 bronze badge. Where in the function did you put this? This is useful, but I am looking for something different. I updated the post to be a little more clear.


Thanks for the suggestion. I ran into the same problem. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. I have tested this on the recently released Hope someone can provide some insight! The maximum file size is 47 MB.


Valid file types are: 8bf, abf, abr, act, aep, afm, ai, arw, as, ase, avi, bmp, book, cel, cfc, chproj, cptx, cr2, cr3, crf, crw, css, csv, dn, dng, doc, docx, eps, epub, exif, fbx, fla, flac, flv, fm, gif, icma, icml, ico, ics, idml, indd, jpeg, jpg, jsfl, json, log, loss, lrcat, lrtemplate, m4a, mif, mov, mp3, mp4, mpg, nef, nrw, obj, odt, orf, otc, otf, pdf, pfb, pfm, pmd, png, ppj, ppt, pptx, prc, prel, prproj, ps, psb, psd, raf, raw, rtf, sbs, sbsar, sbsm, scc, ses, sesx, skp, sol, srt, srw, ssa, stl, svg, swf, tif, ttc, ttf, txt, wav, wmv, x3f, xd, xls, xlsx, xml, xmp.