Welcome Guest Search | Active Topics | Sign In | Register

PDF Document Information Cut Off Options
CWoods
Posted: Tuesday, July 22, 2014 3:26:14 PM
Rank: Advanced Member
Groups: Member

Joined: 7/14/2014
Posts: 40
I'm doing the following to set the PDF information for HTML->PDF converted documents using EO.Pdf v5.0.86.2 (v110):

Code: C#
PdfDocument doc = new PdfDocument();

                    doc.Info.Author = "Author";
                    doc.Info.Title = "Title";
                    doc.Info.Creator = "Creator";
                    doc.Info.Keywords = "Keywords";
                    doc.Info.Producer = "Producer";
                    doc.Info.Subject = "Subject";
                    doc.Info.Title = "Title";

                    HtmlToPdf.ConvertHtml(html, doc);
                    doc.Save(req.Target);


But when I bring up the properties in Adobe Reader (v11.x), it appears that some of the various fields are getting cut off. Title, Subject, and Application are each missing the last character of the value that I set.

Also is this the best way (and maybe only way really) to set the document information for converted documents? I don't think that I saw any way to specify the information as part of the Options class. What impact in terms of performance is there for using the above route compared with the ConvertUrl()/ConvertHtml() calls that take an output file path? Or is there no expected performance difference?
eo_support
Posted: Tuesday, July 22, 2014 4:29:14 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

We tested it at here and it seem to work fine. If the problem continues, you can try to isolate the problem into a test app and send us the test app. We will look into it as soon as we receive it. Please also include the "wrong" PDF file with your test app. See here for more information about test app:

http://www.essentialobjects.com/forum/test_project.aspx

The way you have is the right way to set document information for the converted PDF document. The performance implication is negligible because the one that takes a file name does essentially what you do here ---- creating a PdfDocument object, convert into that object, then call Save to save it to a file.

Thanks!

CWoods
Posted: Wednesday, July 23, 2014 9:42:43 AM
Rank: Advanced Member
Groups: Member

Joined: 7/14/2014
Posts: 40
Test project uploaded.
eo_support
Posted: Wednesday, July 23, 2014 3:26:01 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

We looked into the "wrong" PDF file you sent to us and it seems to be fine. Our steps are:

1. Open the PDF file with Adobe Reader;
2. Go to File -> Properties;
3. On the "Description" tab it shows all the information correctly with no cut off;

We also looked into the file and it appears to be fine as well. You can open the PDF file with a text editor and you should see those fields at the beginning of the file with no missing characters (Do not try to modify and resave the PDF file with a text editor. PDF is not a text format but this particular part is in plain text).

You may want to try to open the file on a different machine, or with a different PDF file viewer to see if the problem is related to your PDF viewer.

Thanks!
CWoods
Posted: Wednesday, July 23, 2014 4:07:09 PM
Rank: Advanced Member
Groups: Member

Joined: 7/14/2014
Posts: 40
Odd. I didn't think to pop open the PDF in a text viewer but in doing that I definitely see that the values I specified are in fact there in full. It must be a bug with either Adobe Reader XI or with my particular install though I don't see that happening for other PDFs that I open from other sources.

Consider this issue closed.
eo_support
Posted: Wednesday, July 23, 2014 7:35:09 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
OK. We will close this issue for now. Please feel free to reopen this issue should you have any new findings.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.