Semi Off Topic: itextSharp and PDF-version

The PDF-XChange Viewer for End Users
+++ FREE +++

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Post Reply
Peter2
User
Posts: 843
Joined: Mon Sep 13, 2010 10:09 am
Location: Switzerland

Semi Off Topic: itextSharp and PDF-version

Post by Peter2 » Tue Mar 22, 2011 6:11 pm

Maybe you can give me an advice ..

I get a lot of PDF, made by itextSharp 4.1.6, and the problem is that there is a confusion PDF-version.

I found two entries in the PDF-File:
Line 1:

Code: Select all

%PDF-1.4
Line 4539:

Code: Select all

<</PageLayout/SinglePage/Version/1.5/Outlines 570 0 R/Pages 6 0 R/PageMode/UseOutlines/Type/Catalog/ViewerPreferences<</DisplayDocTitle true>>>>
PDF-XChange and Adobe Reader show me "Version 1.5", other software shows me "1.4". Can you tell me where is the problem: the files from iTextSharp or the results?

Peter
PDF-X-Change Pro German

Lzcat - Tracker Supp
Site Admin
Posts: 714
Joined: Thu Jun 28, 2007 8:42 am

Re: Semi Off Topic: itextSharp and PDF-version

Post by Lzcat - Tracker Supp » Wed Mar 23, 2011 11:11 am

Regarding to PDF specification file version should be declared at the begining of file like %PDF-1.4 in your case. But later Adobe decided that it can be updated in document catalog (/Version/1.5 in your case). Primary concern of such update - modifting document using incremental update (in this case original file remains unchanged at the begining, all changes are stored as addition after it) and using features that are not allowed by original spec. version (for example Polygon annotation require pdf version 1.5 or higher). If this record is present - it override version specified at the begining of document, so problem is in your "other software" (and maybe in creator, if it use such version update without a reason).
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.

Peter2
User
Posts: 843
Joined: Mon Sep 13, 2010 10:09 am
Location: Switzerland

Re: Semi Off Topic: itextSharp and PDF-version

Post by Peter2 » Wed Mar 23, 2011 2:37 pm

Thanks for the info, Stephan.

Peter
PDF-X-Change Pro German

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13654
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Semi Off Topic: itextSharp and PDF-version

Post by Tracker Supp-Stefan » Wed Mar 23, 2011 3:17 pm

You are welcome Peter,

but that was Victor that gave the explanation above ;)
(he is the one hiding behind the nick of LzCat )

Cheers,
Stefan

Peter2
User
Posts: 843
Joined: Mon Sep 13, 2010 10:09 am
Location: Switzerland

Re: Semi Off Topic: itextSharp and PDF-version

Post by Peter2 » Wed Mar 23, 2011 4:43 pm

Oh, sorry.

Thanks, Victor.

Peter
PDF-X-Change Pro German

User avatar
Paul - Tracker Supp
Site Admin
Posts: 4965
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Semi Off Topic: itextSharp and PDF-version

Post by Paul - Tracker Supp » Wed Mar 23, 2011 5:00 pm

:)
_________________
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com

Post Reply