So we have 2 pdf files. I need to increase the header and footer margins.
I am using the PdfFileEditor class. I am called the resizeContentsPct method.
Here is the problem.
The first document the height is taller than the width. This document is adjusted correctly.
The second document, the width is greater than the height (landscape ish). Instead of the
top and bottom margins being adjusted, the left and right ones are being adjusted and it looks
like every page is shifted down and to the right. If I call the resizeContentsPct method with the
width and height parameters switched, the document gets resized correctly.
Hi Timothy,
I have been away for almost a week. As far as those docs, they are company proprietary. I will see if I can find some or make some that will produce the problem.
Hi Timothy,
It does not matter how you protect anything on this site, I still cannot release company documents. It may take a few days for me to generate some PDF’s but I will let you know if I am able to reproduce the problem at that time.
I am trying to come up with a repeatable example using Adobe Pro. I sort of have one but until it is 100% I will not submit it. I do have one question however.
When using the PdfFileEditor and calling resizeContents (Document ,null, ContentsResizeParameters) I get results that seem confusing.
With Adobe Pro I have created a 2 page pdf from a 2 page Power Point slide.
I create a Document.
Document doc = new Document(“Test PDF”);
I set the content resize parameters Top=10, Bottom=10, Left=0, Right=0.
If I call (Document ,null, ContentsResizeParameters)
The resulting pdf has the top and margins adjusted as expected.
Now if I take that same PDF, edit in Adobe Pro and rotate the document 90 to the right and run it again through the same PDF code, the Left and Right margins are adjusted instead of the top and bottom.
Is this how it is suppose to work? Thanks.
timothy.bounds:It does not matter how you protect anything on this site, I still cannot release company documents. It may take a few days for me to generate some PDF's but I will let you know if I am able to reproduce the problem at that time.
timothy.bounds:When using the PdfFileEditor and calling resizeContents (Document ,null, ContentsResizeParameters) I get results that seem confusing.
With Adobe Pro I have created a 2 page pdf from a 2 page Power Point slide.
I create a Document.
Document doc = new Document(“Test PDF”);
I set the content resize parameters Top=10, Bottom=10, Left=0, Right=0.
If I call (Document ,null, ContentsResizeParameters)
The resulting pdf has the top and margins adjusted as expected.
Now if I take that same PDF, edit in Adobe Pro and rotate the document 90 to the right and run it again through the same PDF code, the Left and Right margins are adjusted instead of the top and bottom.
Is this how it is suppose to work? Thanks.
I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWJAVA-34188. We will
investigate this issue in details and will keep you updated on the status of a
correction. <o:p></o:p>
We apologize for your inconvenience.