Using a shell command I have been able to convert .tif files to pdf files. Unfortunately the outputed files are in pdf/A ver 1.3 and I need it to pdf/A v1.4 or 1.5.
This is my command (output in v1.3):
Convert test.tif test.pdf
I think the command is using imagemagick tool (which use ghostscript) to do the conversion
So I tried this ( still 1.3 but the pdf/A is not valid):
convert test.tif pdfa:test.pdf
Then I tried to convert the pdf 1.3 to 1.5 using ghostscript
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=new-test1.5.pdf test.pdf
This work just fine.Do you think is possible to convert .tif file directly to .pdf 1.4 or 1.5 ?
I tried to check the gosthscript files but I was not able to do any modification leading to my excpected result.
Thank you for your help
RFlow
You have not stated which version of PDF/A you require. If you need PDF/A-1a or PDF/A-1b then you cannot produce a PDF greater than PDF 1.3 as that is specifically forbidden by the specification.
Why do you need PDF 1.4 or 1.5 ? The PDF version is simply a statement of the minimum feature set used by this PDF file, PDF is forward-compatible, a PDF 1.4 consumer can also by definition read PDF 1.3 files. Since you started with TIFF I cannot see any way that your PDF file needs to be of a higher level than PDF 1.3
Your Ghostscript command line will produce a PDF file which states that it requires a consumer of at least level 1.5 (which is a lie ;-) but the resulting PDF will not be PDF/A compliant.
So you really need to explain why you need a PDF/A file, and why it has to be PDF version 1.4 or greater.
Related
I am able to convert the PDF version from 1.5 to 1.7 with the below Ghostscript code but how to convert "PDF version 1.7 ExtensionLevel 8"?
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dFastWebView=true -dCompatibilityLevel=1.7 -sOutputFile=output.pdf input.pdf
What exactly are you expecting to happen here ?
Your command line doesn't actually do anything except write a different version number into the PDF header. The same would be true of writing an extension version, all it does is change the 'version', it doesn't affect the content of the PDF file.
Ghostscript's pdfwrite device doesn't even use the features of PDF 1.5 (with a couple of minor exceptions), so what do you expect to gain even by producing a PDF 1.7 file ?
Lying about the minimum required version (which is what you are doing when you change the version like this) simply means that older PDF consumers might fail to open the file (or give a warning) because they believe it will use features which they don't support. Since the PDF file doesn't use those features, you are actually making the file less portable by doing this.
FWIW Ghostscript's pdfwrite device can now produce PDF 2.0 files.
If you absolutely are insistent about doing this you can 'probably' add an Extensions dictionary to the document Catalog using pdfmarks, but I'm not 100% confident.
For Spring versions 5.x I cannot find any epub or pdf version of the reference documentation. Former versions were available e.g. at https://docs.spring.io/spring/docs/4.3.9.RELEASE/spring-framework-reference/epub/. Are they available any more? epubs are perfect to be read with an ebook reader.
My guess is that it will get published in time.
Meanwhile - this is the 5.0.4.RELEASE docs in pdf:
https://docs.spring.io/spring/docs/current/spring-framework-reference/pdf/
which you can convert to epub if you wish to do so.
The only officially available and latest epub is the 5.0.0.M5: https://docs.spring.io/autorepo/docs/spring-framework/5.0.0.M5/spring-framework-reference/epub/
The epub for the latest version is not available.
but, I would recommend you to try to convert the html documentation directly to epub.
as converting pdf to epub does not result in very good result [as tools like calibre convert the pdf to html and then epub]
I tried a online converter to convert the https://docs.spring.io/spring/docs/current/spring-framework-reference/
and works pretty good.. [especially the code blocks seem better than the official epub]
hope you find this helpful.
I'm looking for a framework, code or somethingelse, to convert a xsl-fo file to docx.
Currently i'm working on an converter, but i can't belive that's no code for these problem will be exists.
My search results shows only code for the generation of pdf or rtf from xsl-fo.
Docx4j seems, that these framework can do this convert.
Thank you very much in advance for your help
I used to Count pages in a pcl file using the GhostPDL (pcl6.exe) in Version 8.71.
pcl6.exe -dNOPAUSE -sDEVICE=nullpage -g10x10 -C file.prn
which produced a
%%PageCount: 10
for instance. Now I updated to 9.10 Version and found that my usual code did not work anymore. The command line Switch "-C" is gone.
I searched the documentation but it brought me nowwhere close to a solution. So it does not seems a very good approach to convert PCL to PDF and then count the PDF pages with GhostScript.
Any suggestions?
Why is converting to a PDF and then using pdfinfo not a good solution ?
I'm trying to get our server to convert PDFs to image files. It's a CentOS 5.3 system and the latest version of ghostscript that can be (8.70), has been installed.
When I try to convert a PDF I get the following error repeated for each page, and the result is a load of blank images.
**** ERROR: Unable to process JPXDecode data. Page will be missing data.
So, I found an answer on here that seemed to answer that question:
iText PDF; howto convert jpeg2000 to jpg using Java
Following that I downloaded iText 5.3.4 and jai_imageio-1.1.jar and compiled the supplied script on my local machine. When I run the final conversion command on my PDF I get:
java.lang.NullPointerException
at com.itextpdf.text.pdf.parser.PdfImageObject.decodeImageBytes(PdfImageObject.java:296)
at com.itextpdf.text.pdf.parser.PdfImageObject.<init>(PdfImageObject.java:199)
at com.itextpdf.text.pdf.parser.PdfImageObject.<init>(PdfImageObject.java:158)
at PDFConverter.hasJpeg2000(PDFConverter.java:36)
at PDFConverter.main(PDFConverter.java:15)
Doesn't contain any JPEG2000 images: Nothing to be done...
I'm not sure whether that's definitely saying that the PDF doesn't have any JPEG2000 images, or whether I've done something wrong when I compiled the script. Perhaps I've got the wrong version of iText since no links were provided in the answer to that other question.
So now I either need help to convert my PDFs to remove any JPEG2000 images, or I need help to get our server running ghostscript properly.