nhmkdev / pdfconstruct

MIT License
2 stars 0 forks source link

PDF Format #2

Open jmb496 opened 8 years ago

jmb496 commented 8 years ago

I noticed Drive Thru Cards requires PDF/X-1a:2003 format. Not familiar with the different pdf versions. Is this output compatible?

Ref: http://www.drivethrucards.com/pub_prepare_cards.php

nhmkdev commented 8 years ago

I'll have to investigate if PDFSharp natively supports this (rough guess is "not exactly"). It appears that Acrobat can help convert, assuming the input images do not contain transparency: https://helpx.adobe.com/acrobat/using/pdf-x-pdf-a-pdf.html

nhmkdev commented 8 years ago

PDF Sharp appears to use transparency settings whenever drawing anything to a page (images, shapes, whatever). I will likely have to inquire how to disable this. Without this functional Acrobat is unable to convert to a PDF/X document (transparency is the one item the conversion fails on).

jmb496 commented 8 years ago

So here's some follow-up. I haven't gotten my proofs from the printer yet, but the files look good, so I assume there won't be any horrible format-related issues.

Here's the weird thing. My original 160 page (1 card per page) 300dpi pdf was about 300MB. DTC tells me they have a limit of about 150MB per file for their printer. DTC opened my file in Acrobat Pro, and did a "save as" to produce a 150MB file that looks pretty much identical. I couldn't get them to tell me what settings/formats they were "saving as", and I couldn't duplicate this instant file size reduction with Adobe Reader, SumatraPDF or NitroPDF.

So not sure what the cause is, but the properties in Reader tell me the original is PDF version 1.4 (Acrobat 5.x), and the smaller file is version 1.5 (Acrobat 6.x).

So ideally, it'd be nice to have a minimal file size, but I can't really tell you what the issue is.

Thanks.

nhmkdev commented 8 years ago

The version information might be a hint. I'll investigate if there are any options in PDF Sharp that can affect the size without messing up the quality.

nhmkdev commented 8 years ago

PDFSharp has support for PDF 1.5 planned in the future. That functionality should provide the compression that DTC mentioned. Sadly the free version of Acrobat does not appear to perform the optimization and/or version switch when opening and saving an exported file from PDFConstruct. 7zip was able to compress a sample pdf file of mine quite well so that's an option (not a good option, just an option).

jmb496 commented 8 years ago

My understanding is that DriveThruCards' printer can only handle files of about 150MB or less, so the unzipped pdf has to be that small. That said, they've been very helpful and willing to save my pdfs in the 1.5 format and send it back to me, so it's not a show stopper.