PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Jul 01, 2024 2:20 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Mar 05, 2013 9:53 pm 
Offline

Joined: Sun Mar 03, 2013 5:32 pm
Posts: 6
I'm working with a PDF scanned image. The image is stored as CCITTFaxDecode. I'm trying to extract the /DecodeParms for the image using GetValue("/DecodeParms"), and get this message:

"Debug.Assert(type != null, "No value type specified in meta information. Please send this file to PDFsharp support.");"

Also the object's Meta parameter is Null

Anyone have a hint????

[Here is the PDF Header]
%PDF-1.4 Sharp Scanned ImagePDF
%Sharp Non-Encryption
3 0 obj
<<
/Type /Page
/Parent 1 0 R
/Resources 4 0 R
/Contents 5 0 R
/MediaBox [0 0 613 790]
>>
endobj
4 0 obj
<<
/ProcSet [/PDF /ImageB]
/XObject << /Img1 6 0 R >>
>>
endobj
5 0 obj
<<
/Length 27
>>
stream
613 0 0 790 0 0 cm
/Img1 Do
endstream
endobj
6 0 obj
<<
/Type /XObject
/Subtype /Image
/Name /Img1
/Filter /CCITTFaxDecode
/DecodeParms << /K -1 /Columns 1704 /Rows 2196 >>
/Width 1704
/Height 2196
/BitsPerComponent 1
/ColorSpace /DeviceGray
/Length 7 0 R
>>
stream


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 06, 2013 9:06 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
andy_t wrote:
Anyone have a hint????
How about trying GetArray("/DecodeParms") or GetDictionary("/DecodeParms")?
There is a list of values, not just a single value so GetValue can't help (but I don't know which function has to be used in this case).

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 06, 2013 3:01 pm 
Offline

Joined: Sun Mar 03, 2013 5:32 pm
Posts: 6
Yes, GetDictionary("/DecodeParms") returns a PdfDictionary with the elements. Then I had to call GetInteger("/K") ..("/Columns") and ..("/Rows") to get the values.

Thanks for the clarification..... I'm still learning how to use PDFSharp~!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group