PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

What version PDF does PDF Sharp write?
http://forum.pdfsharp.com/viewtopic.php?f=2&t=1278
Page 1 of 1

Author:  jliebman [ Wed Jul 28, 2010 12:23 pm ]
Post subject:  What version PDF does PDF Sharp write?

I am currently using the Gios PDF Splitter Merger (PSM) software library but am not happy with its handling of PDF Forms. If PDFSharp is a better product I will replace PSM with it. The initial question is What version of a PDF document does the PDFSharp product write when it combines or concatenates PDF "pages" into a file?

I have the following problem in a set of programs we use to process data from email (Outlook) and load it into a database as attachments to case studies using the PSM product - PDFs that contain pages that contain form data, when retrieved from the database, do not display the form field data when viewed in Adobe 9

Following is the process for creating the PDFs:

1) A PDF form comes as an attachment in Outlook. I have a program that displays the document, and you can see the form data
2) I drag and drop the document (or pages thereof) into another application that associates the PDF pages with other pertinent documents for a case, then uses PSM to merge the documents into a single PDF
3) I read the PDF into a binary array, then write the array into a binary database field

To retrieve the PDF:

1) the database query retrieves the data, writes a binary stream, calls the PSM module to create the PDF file, then uses Adobe to display it
2) any document pages that do NOT have form data display correctly, but any pages that DO have form data do not display correctly

I have ascertained that PSM writes version 1.4 Adobe PDF documents, and I suspect that is part of the problem.

TIA

Jory Liebman
STAIR Systems / Southeastern Overread Services (SoS)
Mobile: 336-337-3858

Author:  jccapps [ Fri Aug 06, 2010 3:41 pm ]
Post subject:  Re: What version PDF does PDF Sharp write?

I just checked one of my documents that was created with PDFSharp version 1.31 and the first line in the debug data of the file is "PDF-1.4". So I would assume that is PDF version 1.4. I'm not sure if this is configurable or not.

If you create a pdf using a debug version of PDFSharp and then open it using wordpad, the first line should be the pdf version.

Author:  () => true [ Sun Aug 08, 2010 9:12 am ]
Post subject:  Re: What version PDF does PDF Sharp write?

jccapps wrote:
I'm not sure if this is configurable or not.

You can set the version that is written (IIRC in the range 12 through 17).
Files will always be compatible with Reader 5.0 and later because PDFsharp doesn't support features from PDF 15 or newer yet.
Setting version to 13 will disable alpha transparency (not supported by Adobe Reader 4.0 and earlier).

Set the Version member of PdfDocument.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/