Re: Some merged PDF documents open to pages other than first page.

2018-02-12 Thread Tilman Hausherr

Am 12.02.2018 um 21:21 schrieb David Fertig:

I can see that the open page action when from 1 to like 13 so setting the 
openAction to null seems to resolve my issue.

How can I use PDPageDestination to reset it to 1 manually instead of just 
removing the action entirely?  (Is that guaranteed to open to page 1?)


To set it to page 1 you'd need to first get that page 
(document.getPage(0)) and then


PDPageDestination dest = PDPageFitDestination();
dest.setPage(page); // must be a PDPage, not a number!
PDActionGoTo action = new PDActionGoTo();
action.setDestination(dest);
document.getDocumentCatalog().setOpenAction(action);


Tilman




Thank you again,
Dave

-Original Message-
From: Tilman Hausherr [mailto:thaush...@t-online.de]
Sent: Monday, February 12, 2018 11:52 AM
To: users@pdfbox.apache.org
Subject: Re: Some merged PDF documents open to pages other than first page.

Maybe that file had an OpenAction pointing to that page? There is a recent 
change that takes care to keep the destination after a merge.

If you don't want that, just remove the OpenAction.
(document.getDocumentCatalog().setOpenAction(null) )

Tilman

Am 12.02.2018 um 17:22 schrieb David Fertig:

I've been merging a lot of pdfs in various orders.  I have one PDF in
particular that where-ever I put it in the merge order, when that
combined PDF is opened, it always goes to the first page of that
special document.  So if I merge a 3, 3, 2, 1, and the 2-pager is the
magic document, that pdf is always opened to page 7 (first page of 2
pager). Any thoughts?

Thank you in advance,

Dave

cid:image001.png@01D326FE.E40DBA90
<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnavih
ealth.us%2F&data=02%7C01%7CDavid.Fertig%40navihealth.com%7Cc6f7986c78f
644665e4908d57238df3f%7C6e94af0345c143158632e1c94ce46b97%7C1%7C1%7C636
540510952976374&sdata=m5k6EZ%2FmMdwFi0t0rYB2I3CXrrNrWqqsKf%2FfmbJUHyw%
3D&reserved=0>



David Fertig
Principal Software Engineer

O:617.420.1483
M:508.353.4348
F:617.988.8530

This email, including attachments, may contain information that is
privileged, confidential or is exempt from disclosure under applicable
law (including, but not limited to, protected health information). It
is not intended for transmission to, or receipt by, any unauthorized
persons. If the reader of this message is not the intended recipient,
or the employee or agent responsible for delivering the message to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you believe this email was sent to you in error, do not read it.
Please notify the sender immediately informing them of the error and
delete all copies and attachments of the message from your system.
Thank you.


This email, including attachments, may contain information that is privileged, 
confidential or is exempt from disclosure under applicable law (including, but 
not limited to, protected health information). It is not intended for 
transmission to, or receipt by, any unauthorized persons. If the reader of this 
message is not the intended recipient, or the employee or agent responsible for 
delivering the message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited. If you believe this email was sent to you in error, do not read it. 
Please notify the sender immediately informing them of the error and delete all 
copies and attachments of the message from your system. Thank you.

-
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org



RE: Some merged PDF documents open to pages other than first page.

2018-02-12 Thread David Fertig
I can see that the open page action when from 1 to like 13 so setting the 
openAction to null seems to resolve my issue.

How can I use PDPageDestination to reset it to 1 manually instead of just 
removing the action entirely?  (Is that guaranteed to open to page 1?)

Thank you again,
Dave

-Original Message-
From: Tilman Hausherr [mailto:thaush...@t-online.de]
Sent: Monday, February 12, 2018 11:52 AM
To: users@pdfbox.apache.org
Subject: Re: Some merged PDF documents open to pages other than first page.

Maybe that file had an OpenAction pointing to that page? There is a recent 
change that takes care to keep the destination after a merge.

If you don't want that, just remove the OpenAction.
(document.getDocumentCatalog().setOpenAction(null) )

Tilman

Am 12.02.2018 um 17:22 schrieb David Fertig:
>
> I've been merging a lot of pdfs in various orders.  I have one PDF in
> particular that where-ever I put it in the merge order, when that
> combined PDF is opened, it always goes to the first page of that
> special document.  So if I merge a 3, 3, 2, 1, and the 2-pager is the
> magic document, that pdf is always opened to page 7 (first page of 2
> pager). Any thoughts?
>
> Thank you in advance,
>
> Dave
>
> cid:image001.png@01D326FE.E40DBA90
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnavih
> ealth.us%2F&data=02%7C01%7CDavid.Fertig%40navihealth.com%7Cc6f7986c78f
> 644665e4908d57238df3f%7C6e94af0345c143158632e1c94ce46b97%7C1%7C1%7C636
> 540510952976374&sdata=m5k6EZ%2FmMdwFi0t0rYB2I3CXrrNrWqqsKf%2FfmbJUHyw%
> 3D&reserved=0>
>
>
>
> David Fertig
> Principal Software Engineer
>
> O:617.420.1483
> M:508.353.4348
> F:617.988.8530
>
> This email, including attachments, may contain information that is
> privileged, confidential or is exempt from disclosure under applicable
> law (including, but not limited to, protected health information). It
> is not intended for transmission to, or receipt by, any unauthorized
> persons. If the reader of this message is not the intended recipient,
> or the employee or agent responsible for delivering the message to the
> intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited.
> If you believe this email was sent to you in error, do not read it.
> Please notify the sender immediately informing them of the error and
> delete all copies and attachments of the message from your system.
> Thank you.


This email, including attachments, may contain information that is privileged, 
confidential or is exempt from disclosure under applicable law (including, but 
not limited to, protected health information). It is not intended for 
transmission to, or receipt by, any unauthorized persons. If the reader of this 
message is not the intended recipient, or the employee or agent responsible for 
delivering the message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited. If you believe this email was sent to you in error, do not read it. 
Please notify the sender immediately informing them of the error and delete all 
copies and attachments of the message from your system. Thank you.

-
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org



Re: Some merged PDF documents open to pages other than first page.

2018-02-12 Thread Tilman Hausherr
Maybe that file had an OpenAction pointing to that page? There is a 
recent change that takes care to keep the destination after a merge.


If you don't want that, just remove the OpenAction. 
(document.getDocumentCatalog().setOpenAction(null) )


Tilman

Am 12.02.2018 um 17:22 schrieb David Fertig:


I’ve been merging a lot of pdfs in various orders.  I have one PDF in 
particular that where-ever I put it in the merge order, when that 
combined PDF is opened, it always goes to the first page of that 
special document.  So if I merge a 3, 3, 2, 1, and the 2-pager is the 
magic document, that pdf is always opened to page 7 (first page of 2 
pager). Any thoughts?


Thank you in advance,

Dave

cid:image001.png@01D326FE.E40DBA90 



David Fertig
Principal Software Engineer

O:617.420.1483
M:508.353.4348
F:617.988.8530

This email, including attachments, may contain information that is 
privileged, confidential or is exempt from disclosure under applicable 
law (including, but not limited to, protected health information). It 
is not intended for transmission to, or receipt by, any unauthorized 
persons. If the reader of this message is not the intended recipient, 
or the employee or agent responsible for delivering the message to the 
intended recipient, you are hereby notified that any dissemination, 
distribution or copying of this communication is strictly prohibited. 
If you believe this email was sent to you in error, do not read it. 
Please notify the sender immediately informing them of the error and 
delete all copies and attachments of the message from your system. 
Thank you. 





Some merged PDF documents open to pages other than first page.

2018-02-12 Thread David Fertig
I've been merging a lot of pdfs in various orders.  I have one PDF in 
particular that where-ever I put it in the merge order, when that combined PDF 
is opened, it always goes to the first page of that special document.  So if I 
merge a 3, 3, 2, 1, and the 2-pager is the magic document, that pdf is always 
opened to page 7 (first page of 2 pager).   Any thoughts?
Thank you in advance,
Dave


[cid:image001.png@01D326FE.E40DBA90]


David Fertig
Principal Software Engineer
O: 617.420.1483
M: 508.353.4348
F: 617.988.8530




This email, including attachments, may contain information that is privileged, 
confidential or is exempt from disclosure under applicable law (including, but 
not limited to, protected health information). It is not intended for 
transmission to, or receipt by, any unauthorized persons. If the reader of this 
message is not the intended recipient, or the employee or agent responsible for 
delivering the message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited. If you believe this email was sent to you in error, do not read it. 
Please notify the sender immediately informing them of the error and delete all 
copies and attachments of the message from your system. Thank you.