pdfmark | MOVED TO https : //gitlab.com/crossref/pdfmark | Continuous Deployment library

 by   CrossRef Java Version: Current License: No License

kandi X-RAY | pdfmark Summary

kandi X-RAY | pdfmark Summary

pdfmark is a Java library typically used in Devops, Continuous Deployment, Docker applications. pdfmark has no bugs, it has no vulnerabilities and it has low support. However pdfmark build file is not available. You can download it from GitHub, GitLab.

2018/01/15: pdfmark is not working with Java 9. You must use 8 or below. To run with Docker. You should find a file named '/tmp/test-pdf_xmp.pdf'.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pdfmark has a low active ecosystem.
              It has 31 star(s) with 13 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 2 have been closed. On average issues are closed in 182 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of pdfmark is current.

            kandi-Quality Quality

              pdfmark has 0 bugs and 0 code smells.

            kandi-Security Security

              pdfmark has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pdfmark code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pdfmark does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              pdfmark releases are not available. You will need to build from source code and install.
              pdfmark has no build file. You will be need to create the build yourself to build the component from source.
              pdfmark saves you 789 person hours of effort in developing the same functionality from scratch.
              It has 1815 lines of code, 118 functions and 30 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pdfmark and discovered the below as its top functions. This is intended to give you an instant insight into pdfmark implemented functionality, and help decide if they suit your requirements.
            • Writes information dictionary to specified output file
            • Extracts all XMP schemas from a blob
            • Parses an RdfList element
            • Get namespace declarations
            • Parse an rdf element
            • Extracts key - value pairs from a PDF document
            • Writes a XMP schema set to the document
            • Get the titles of a node
            • Returns the preferred ISSN element
            • Process the unix reference
            • Evaluates the XPath expression
            • Adds a list of values to a schema object
            • Grab metadata for a specific doi
            • Logs the error with the given code and error code
            • Merge two Xmp descriptions
            • Checks if a PDF file is Linearized
            • Main method for testing
            • Writes a XMP SchemaSet to the output stream
            • Read the entire file
            • Get the namespace URI declaration of an element
            Get all kandi verified functions for this library.

            pdfmark Key Features

            No Key Features are available at this moment for pdfmark.

            pdfmark Examples and Code Snippets

            No Code Snippets are available at this moment for pdfmark.

            Community Discussions

            QUESTION

            Is there a way discard previous pdfmark metadata?
            Asked 2021-Apr-01 at 16:18

            I was trying to automate adding title, bookmarks and such to some PDFs I need. The way I came up with was to create a simple pdfmark script like this:

            ...

            ANSWER

            Answered 2021-Apr-01 at 16:18

            I'll leave PostScript to others and show how to remove a PDF outline using the qpdf package (for qpdf and fix-qdf) and GNU sed.

            From the qpdf manual:

            In QDF mode, qpdf creates PDF files in what we call QDF form. A PDF file in QDF form, sometimes called a QDF file, is a completely valid PDF file that has %QDF-1.0 as its third line (after the pdf header and binary characters) and has certain other characteristics. The purpose of QDF form is to make it possible to edit PDF files, with some restrictions, in an ordinary text editor.

            (For a non-GNU/Linux system adapt the commands below.)

            Source https://stackoverflow.com/questions/66439637

            QUESTION

            Use Ghostscript to set PDF natural language via pdfmarks
            Asked 2020-Sep-06 at 13:58

            I'm setting metadata on PDFs using Ghostscript and pdfmarks. I'm able to set just about everything I need IE: Title, Author, Bookmarks, etc using pdfmarks. However, I can not set the Natural Language. I'm sure I'm just missing the correct syntax, as I've looked over Adobe documentation and see it listed in there.

            This is what I have tried:

            ...

            ANSWER

            Answered 2020-Sep-06 at 13:58

            That's a logical structure pdfmark StPNE, but the last pdfmark reference I can find (version 9 from 2008) does not list /Lang as a legal attribute for a logical structure pdfmark.

            I note that the PDF specification does permit /Lang to be a member of a logical structure element, but that doesn't mean there's a pdfmark for it. I think Adobe stopped updating the pdfmark reference with new content for new versions of the PDF specification.

            /Type /Catalog won't be legal either.

            Can you explain which part of the resulting PDF you are trying to add this to ? Ghostscript only implements the pdfmarks listed in the pdfmark refrence, and I don't think it fully implements all of those currently.

            [EDIT]

            I just checked and Ghostscript's pdfwrite device does not implement the StPNE pdfmark at all, so that's not going to do anything.

            [further edit]

            It may be (looking at the PDF specification) that what you want is to set a key called /Lang in the Catalog object of the PDF file. Obviously I'm not certain but....

            Source https://stackoverflow.com/questions/63757618

            QUESTION

            Resize all PDF pages to letter size - how to resize or remove CropBox?
            Asked 2020-Jun-05 at 17:15

            I'm using a service that requires all PDF pages to be the same exact size. Right now, the second page of my PDF is US letter size, but the first page is a little smaller than that - I would like the first page to be letter size as well.

            Here's a sample PDF of what I'm starting with. Here's what pdfinfo says about this file to start with:

            ...

            ANSWER

            Answered 2020-Jun-05 at 17:15

            Well, I found this answer that includes a method to remove CropBoxes using sed (!), which seems to be working for me:

            Source https://stackoverflow.com/questions/62220418

            QUESTION

            How to add TrimBox and BleedBox without fonts being rasterized
            Asked 2020-May-11 at 21:40

            I want Ghostscript to prepare PDFs for print production. The input PDF (Version 1.3) is in RGB, uses transparency and has crop marks.

            1. Convert colors to CMYK by applying an ICC profile
            2. Add a TrimBox and a BleedBox

            I managed to achieve the steps above using the following command:

            ...

            ANSWER

            Answered 2020-Apr-28 at 15:52

            OK a few points:

            Ghostscript (and more particularly the pdfwrite device) doesn't add anything to PDF files. It makes brand new PDF files from the supplied input, whcih may or may not be a PDF file.

            The process is described here and I'd suggest you read it. Essentially you cannot assume that the conent of the produced PDF file bears any relationship at all to the conent of the input, if its a PDF file.

            Your usage of ICC profiles is not causing the conversion to CMYK, that's done by setting ColorConversionStrategy. Your setting of OverrideICC and OutputICCProfile aren't doing anything and you shold remove those switches. In addition you should not set ProcessColorModel if you are setting ColorConversionStrategy. Similarly setting RenderIntent does nothing at all with the pdfwrite device, drop that too.

            Don't set the resolution. All that does is set the resolution of any content which must be rendered (eg creating a PDF file < version 1.4 from an input file containing transparency). So drop the -r100.

            -dPDFX doesn't cause fonts to be rasterised.

            If that's happening then its almost certainly nothing to do with selecting PDFX, without seeing your input file I can't comment further.

            -dPDFX is not necessary to create a PDF file with TrimBox or BleedBox.

            Of course, what your PostScript actually does is create PDFX Bleed and Trim Offsets, and yes, if you want those then you need to set PDFX, clearly. OTOH if you actually wnt to set normal regular Bleed or Trim boxes then that is also documented in the pdfmark reference (see page 37 of the 1.7 pdfmark reference):

            The syntax for specifying a non-default page cropping for a particular page in a document is as follows: [ /CropBox [xll yll xur yur] /PAGE pdfmark The syntax for specifying the default page cropping for a document is as follows: [ /CropBox [xll yll xur yur] /PAGES pdfmark

            Obviously you would Susbsitute Bleed or Trim for CropBox.

            [Later]

            This command line:

            Source https://stackoverflow.com/questions/61477896

            QUESTION

            GhostScript: Bug under High Sierra setting PDF Metadata?
            Asked 2019-Jan-25 at 13:36

            Can anyone confirm the following behaviour on MacOS 10.13 High Sierra with GhostScript? I don't get the problem when using 10.12 Sierra.

            When I create PDFs in GhostScript, it always leaves the Title, Author and other metadata blank.

            I know that you can set the metadata with PDFmarks within the PostScript file itself (or a secondary merged PS file that just contains PDFmarks), but that requires manually setting the field for each file.

            Currently, my PDFs fail PDF-X validation until I manually add the metadata.

            My PostScript does contain DSC comments, and the GS documentation implies that this should be picked up, as ParseDSCCommentsForDocInfo is true by default.

            ...

            ANSWER

            Answered 2019-Jan-25 at 13:36

            As of MacOS Mojave 10.14.3 and GhostScript version 9.26, this now fixed. I can only presume it was a bug in GhostScript or MacOS.

            Source https://stackoverflow.com/questions/48596450

            QUESTION

            Ghostscript PDFMARK external link on last page
            Asked 2018-Dec-21 at 09:07

            I'm converting a series of Illustrator files into a single PDF document using Ghostscript.

            In that generated pdf document, I'm trying to apply an external link to the last page of the file. To do that I've created a separate script.ps with the following rules:

            ...

            ANSWER

            Answered 2018-Dec-21 at 09:07

            I think your problem is that you are executing the pdfmark before you execute the remaining page descriptions (by the way, beware of using Adobe Illustrator '.ai' files, these are not guaranteed to be valid self-contained PostScript).

            At the time you execute the pdfmark, there are no pages yet defined, so there's no way to translate the page number into the PDF object number which will contain the description of page 5.

            Try running your 'script.ps' as the final operation, not the first.

            Source https://stackoverflow.com/questions/53876615

            QUESTION

            ghostscript settings to open PDF as full page
            Asked 2018-Oct-09 at 15:24

            I know from some colleagues, who are desiging our leaflets in Indesign and store as PDF's that there is a setting to view it in full page mode, when opening the file.

            I did a script to "merge" some of these docs using ghostscript device -pdfwriter and option -dPDFFitPage (edited after KenS' answer)

            here my full command:

            ...

            ANSWER

            Answered 2018-Oct-01 at 12:26

            There is no option -dpdfwriter. The fact that PDFFitPage doesn't do what you want isn't surprising, it has no effect on what a PDF viewer will do. This option (which is described in the documentation) only has any effect when used with a pre-defined fixed media size. It creates a new PDF where the content of the original PDF is scaled so that fits onto the fixed media size.

            If you want to include directions to PDF viewers on how to open PDF documents then you need to look at the pdfmark operator. Specifically you will need to construct a DOCVIEW pdfmark as described on page 29 and 30 of the version 9 pdfmark reference.

            Source https://stackoverflow.com/questions/52585937

            QUESTION

            Ghostscript adding a on one page, avoid processing all pages (for speed reasons)?
            Asked 2018-Oct-04 at 12:11

            We try to add a small link to a large PDF 50 pages and more. The command

            ...

            ANSWER

            Answered 2018-Oct-04 at 12:11

            You can't. The way Ghostscript and the pdfwrite device work is described in ghostpdl/doc/VectorDevices.htm or here.

            I'd suggest you read that to see why this isn't possible, and also to gain some understanding of what's actually going on. You are not simply 'adding a link' you are creating a completely new PDF file, whose contents (at the file level) may bear no relation to the original PDF file's contents.

            Ghostscript + pdfwrite is not a 'PDF editor'/

            Source https://stackoverflow.com/questions/52644163

            QUESTION

            ghostscript ignores part of pdfmarks
            Asked 2018-Sep-28 at 02:41

            I have a problem with pdfmarks when "merging" PDF's with ghostscript 9.22. I have following situation:

            cover.pdf

            In the properties of the document is mentioned

            Title : cover.docx

            Author: Edmond Egg

            input1.pdf

            In the properties of the document is mentioned

            Title : input1.docx

            Author: Charly Cheese

            input2.pdf

            In the properties of the document is mentioned

            Title : input2.docx

            Author: Susanna Sausage

            input3.pdf

            In the properties of the document is mentioned

            Title : input3.docx

            Author: Martha Meet

            pdfmarks ...

            ANSWER

            Answered 2018-Sep-28 at 02:41

            Your DocInfo pdfmarks are incorrect.

            You've put :

            Source https://stackoverflow.com/questions/52532230

            QUESTION

            postscript example to reset form fields using pdfmarks
            Asked 2018-May-28 at 05:28

            I am trying to reset the form fields (on a button click) created using PDFmarks in the post script, I have tried the samples shared in the pdfmarks reference manual with no luck (after distling through acrobat it does not do so). Could someone please share a sample or let me know what i am doing wrong

            My sample code is :-

            ...

            ANSWER

            Answered 2018-May-28 at 05:28

            Issue got resolved, NeedAppearances=true flag in the acroform dictionary was not set due to which reset button was not displaying correctly and reset form action was also not getting executed (interestingly text and combo fields were working fine even without this flag)

            Source https://stackoverflow.com/questions/50506258

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pdfmark

            You can download it from GitHub, GitLab.
            You can use pdfmark like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the pdfmark component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/CrossRef/pdfmark.git

          • CLI

            gh repo clone CrossRef/pdfmark

          • sshUrl

            git@github.com:CrossRef/pdfmark.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link