Print Page | Close Window

Unreadable PDF

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3670
Printed Date: 25 Apr 24 at 9:10PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Unreadable PDF
Posted By: DerbyGull
Subject: Unreadable PDF
Date Posted: 01 Feb 19 at 7:41AM
Hi,

I create a PDF in code from a Crystal Report, I then merge other PDFs to it using the QuickPDF function.  This PDF is fine i can open it and read it no problem. 

The problem i have is that I need to be able to use the resulting PDF with an email printer driver, this involves the printer driver being able to read the contents of the PDF for an email address, however, this PDF is unreadable to the driver. 

I have found that the issue occurs when the Crystal Report is exported to the PDF, if i for instance instead of doing a direct export to PDF from Crystal went via an RTF (RPT>RTF>PDF) then the file is fine and readable by the printer driver but i don't really want that extra step.  Is there a function in the Quick PDF library that can fix the readability issue i have?



Replies:
Posted By: Ingo
Date Posted: 01 Feb 19 at 8:11AM
Hi Rob,


without a relevant sample file from you it's difficult to advice something.
Is one file encrypted and the other ones not?
Is one file linearized and the other ones not?
Perhaps load and save first for all single pdf-files with QuickPDF can help?
With LastErrorCode after each QuickPDF-function you can detect where the probs begin...
You should have a look on the function-names which sounds a bit like analyzing or repairing.

Here are few samples which i would use running through with your pdf-files:
TransformFile
BalancePageTree
NormalizePage
CombineContentStreams
RemoveUsageRights

Another idea is using a commandline-tool like pdftk via shell syntax.


Cheers and welcome here,
Ingo


-------------
Cheers,
Ingo



Posted By: DerbyGull
Date Posted: 06 Feb 19 at 10:02AM
Hi Ingo,

Thanks for the response. 

I tried all those and it had no effect.

What I have found though is that the PDF that is output to the printer using the PrintDocument function is a PDF image file rather than PDF text file, hence the reason the email printer driver could not read the text in it.

I have since tried printing by automatically loading Adobe Reader and automatically printing from there using windows own built in functions and that is fine, but loading up, printing and closing down Adobe Reader for every print is not really the way i want to go.

Is there anything i can do with the quick PDF library to get it to output to the printer as a PDF text file?

Cheers,

Rob


Posted By: tfrost
Date Posted: 06 Feb 19 at 11:10AM
I would go back to your first sentence: 'I create the PDF in code from a Crystal Report'.  Is it this PDF that is an image and not a text PDF?  Once you have created such a PDF as an image and you want to extract an e-mail address from it, you will need an OCR library, not the Quick PDF library, to extract the data.

If you have any control over the code that creates the image, you need to modify that to save the text you need to extract in some other form, such as placing a copy in a header line (like a fax header line) that is a text element, with the image below it.  Or perhaps adding the e-mail address in an alternate data stream in the output PDF and extracting this in your program that does the printing/e-mailing. But if it is simply Crystal Reports that is (incredibly!) creating a non-editable PDF, my guess is that going to PDF via rich text will be quicker, easier, and more reliable than OCR.


Posted By: DerbyGull
Date Posted: 12 Feb 19 at 8:27AM
I've tried scanning with the email printer driver (which does have OCR) rather than direct printing and it now accepts the output.  Thanks for your help.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk