|
Rank: Newbie Groups: Member
Joined: 9/12/2014 Posts: 6
|
Hi Could aynone help me as I'm trying to add new text in header of existing PDF file. For some PDF files it works great but for some stamp text is invisible - I can select it and copy/paste - but is invisible, like Font color was white. Changing block.style.foreground = color.black doesn't work. I do something like: var render = new AcmRender(path); var block = new AcmBlock(new AcmText(stampTekst)); block.Style.Top = 1; block.Style.Left = 1; render.Render(block); doc.Save(destinationPath); For test I don't use product key so on destination file there is text: Created with EO.Pdf for .NET trial version. http://www.essentialobjects.com.This text appears without problems. Thanks in advance. Martin
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, There are two things: 1. You can't use new AcmRender(path). You have to first load the file into a PdfDocument object, then pass the PdfDocument object to AcmRender's constructor; 2. If you are trying to output to the header area, you probably need to adjust the page margins. By default, AcmRender applies an 1 inch margin on all four sides. So when you set Style.Top and Style.Left to 1, the actual output location would be (2, 2). See here for more information on how to set page margins: http://www.essentialobjects.com/doc/4/acm/advanced%20formatting/page_layout.aspx#marginHope this helps. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 9/12/2014 Posts: 6
|
Hi Thanks for quick response. Sorry for inaccuracy in my sample code, but in fact yes, I do : PdfDocument doc = new PdfDocument(docpath); and then var render = new AcmRender(doc); So it is not an issue. I'm aware margins position so it's not an issue as well. Like I said before for many PDF's it works fine and I have exactly what I wanted. But for other - not. I suspect that is for scanned images saved as PDFs with OCR text below image. Text has some settings to be invisible and my added text gets the same settings. Is it possible to change it? But like I said this text: Created with EO.Pdf for .NET trial version. http://www.essentialobjects.com. is visible. Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, In that case please try to create a small test project demonstrating the problem and send the test project (along with the file that has problems) to us. Once we receive it we will look into it here to see what we can find. See here for more instructions on how to submit test project: http://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|
Rank: Newbie Groups: Member
Joined: 9/12/2014 Posts: 6
|
Hi,
Project with sample file has been sent. Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Thank you very much for the test project. We were able to find the root of the problem. We have posted a new build that should work fine with your file. Please see your private message for the download location.
|
|
Rank: Newbie Groups: Member
Joined: 9/12/2014 Posts: 6
|
Thank you very much. It works great now. I have another question, is it possibility to read PDF dimension (DPI) ? I can not find it in Document.Info ...
Regards
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Glad to hear that it works for you!
I am not sure what you meant by PDF dimension. Do you mean PDF file resolution? If that's what you meant, then there is no such thing. PDF file are basically vector format, except for the images in the PDF file that are bitmap and naturally has a preset resolution, pretty much everything else in the PDF file are in vector format and can be zoomed in indefinitely. So there is no DPI value on a PDF file.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 9/12/2014 Posts: 6
|
Hi
Yes, it was question about resolution. During scaning we can set PDF resolution so I thought I can read this value from PDF properties. But it's not a problem. Thanks for a help.
|
|
Rank: Newbie Groups: Member
Joined: 9/12/2014 Posts: 6
|
Hi There is another problem with this new version of dll (6.0.16.2) which I received. My current licence key doesn't work. On stamped image there is text: Created with EO.Pdf for .NET trial version. http://www.essentialobjects.com. Please help. Regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Please revisit your license key page and you should see a new option allowing you to download a license for EO.Pdf 2014. We give free upgrade for one year with your order, so this key will work for all EO.Pdf 2014 build made before the one year cut off date.
Thanks!
|
|