pdfa

Can I return byte[] with GhostscriptProcessor?

家住魔仙堡 提交于 2021-02-08 05:45:18
问题 Is it possible to return byte[] using the GhostscriptProcessor? For example: public static byte[] ConvertToPDFA(byte[] pdfData) { GhostscriptProcessor gsproc = new GhostscriptProcessor(Properties.Resources.gsdll32); //return byte[] from the created PDF/A The method StartProcessing is a void method, but is there any alternative thet can create a PDF/A from a PDF File and return a byte[] from its content? 回答1: It's possible: public class PipedOutputSample { public void Start() { string

Can iTextSharp convert PDF document to PDF/A

一个人想着一个人 提交于 2020-01-11 17:09:31
问题 I cannot locate within the FAQ whether this functionality exists in the API although its mentioned in a book as something that is potentially available. Has anyone had any experience implementing this feature? 回答1: On This thread (dated June 2007) Paulo Soares provides code that shows support for PDF/A. Here's the C# code (he also has a Java sample): private void PdfATest() { Document doc = new Document(PageSize.A4); PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream("C:\\hello_A1-b

.net validation of pdfa file

时光怂恿深爱的人放手 提交于 2020-01-07 01:25:06
问题 I try to write a validation method in a VB project to check if a PDF file is PDF/A. I was playing with itextsharp.pdfa but i don't find a way to validate this. From here I understood that using itextsharp was not possible. Does itextsharp 5.5.5 include some functionalities like this? Are there other dll I can use in a vb.net project for this validation? 回答1: There currently is no such thing, but the European Union has mandated a project to build a "PDF/A Conformance Checker" as an open source

.net validation of pdfa file

可紊 提交于 2020-01-07 01:24:09
问题 I try to write a validation method in a VB project to check if a PDF file is PDF/A. I was playing with itextsharp.pdfa but i don't find a way to validate this. From here I understood that using itextsharp was not possible. Does itextsharp 5.5.5 include some functionalities like this? Are there other dll I can use in a vb.net project for this validation? 回答1: There currently is no such thing, but the European Union has mandated a project to build a "PDF/A Conformance Checker" as an open source

How to generate a valid PDF/A file using iText and XMLWorker (HTML to PDF/A process)

感情迁移 提交于 2019-12-31 00:45:35
问题 I'm currently developing a method that will accept HTML input and convert it into a valid PDF/A file. I know how to programmatically construct a valid PDF/A file using iText (reference: http://itextsupport.com/download/pdfa3.html) but I'm unable to generate a valid PDF/A file using HTML as input and using XMLWorker to transform this input into a PDF file. The problem that I have right now is due to the embedded fonts requirement of the PDF/A format. I always get this exception: Exception in

iText 5 HTML+CSS to PDF/A-2 : Helvetica font not embedded error

最后都变了- 提交于 2019-12-27 12:07:31
问题 The following code is being used for converting HTML file with CSS to PDF/A-2 using iText5 (this code is from the example provided online): public static final String HTML = "D:\\PDFA2\\html\\sample.html"; public static final String CSS = "D:\\PDFA2\\html\\sample.css"; public static final String DEST = "D:\\PDFA2\\html\\sample.pdf"; public void createPdf(String file) throws IOException, DocumentException { Document document = new Document(); PdfAWriter writer = PdfAWriter.getInstance(document

Add alternative text for an image in Tagged PDF in C#

一个人想着一个人 提交于 2019-12-25 09:44:40
问题 I need your help with this: public void manipulatePdf(String src, String dest) throws IOException, DocumentException { PdfReader reader = new PdfReader(src); PdfDictionary catalog = reader.getCatalog(); PdfDictionary structTreeRoot = catalog.getAsDict(PdfName.STRUCTTREEROOT); manipulate(structTreeRoot); PdfStamper stamper = new PdfStamper( reader, new FileOutputStream(dest)); stamper.close(); } public void manipulate(PdfDictionary element) { if (element == null) return; if (PdfName.FIGURE

How to generate PDF file using X++?

送分小仙女□ 提交于 2019-12-24 19:33:50
问题 Can I create simple pdf file in x++? In this pdf I would like to have for example select from one table or simple static text. 回答1: MorphX reports can be saved to PDF by using the proper print settings beforehand. SSRS reports can do this also using similar tricks. Another way is to generate RTF, then let Word do the PDF creation. Silly, but maybe the PDF is smaller or better looking. It is possible, but not simple, to generate PDF directly by using third party .Net components. 回答2: Some

How create PDF/A file from HTML using iTextSharp

流过昼夜 提交于 2019-12-24 19:29:12
问题 I want to create PDF/A from HTML using iTextsharp, but is having a hard time creating something that validateds to PDF/. This is the code that I use to test the functionality. What needs to be changed to get what I want? static void Main(string[] args) { //create stylesheet (used to change font from default Helvetica in order to embed font in PDF/A) var styles = new StyleSheet(); var fontPath = Environment.GetEnvironmentVariable("SystemRoot") + "\\fonts\\verdana.ttf"; FontFactory.Register

Convert PS files to PDF/A via Ghostscript, color space problems

痴心易碎 提交于 2019-12-23 02:25:08
问题 I am faced with a quite similar issue as discussed in this thread. Using GhostScript 9.14 I am trying to create a valid PDF/A from a Postscript file. I am invoking following command: "gswin64.exe" -dPDFA=1 -dBATCH -dNOPAUSE -dNOOUTERSAVE -sColorConversionStrategy=/RGB -sOutputICCProfile=AdobeRGB1998.icc -sDEVICE=pdfwrite -sOutputFile=output.pdf -dPDFACompatibilityPolicy=2 "PDFA_defRGB.ps" input.ps After doing so I validate via Apache's PDFBox and online via www.pdf-tools.com. PDF-tools tells