command line option to copy a pdf exactly

The PDF-XChange Viewer for End Users
+++ FREE +++

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

command line option to copy a pdf exactly

Post by panny »

Hello there,

Q1:
how can I create a copy of a file exactly as is including all "status" information (current page, current zoom factor)? Only filename differs.

Q2:
can I unlock a file per command line or open a file not locked so that pdflatex may overwrite and pdfxcview may refresh?

I'm on Windows XP.

Thank you.
panny
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hello Panny,

Your first question is related to file operations, so copying it with a different name is something you should do on an OS level rather than in our Viewer.

As for your second question, please have a look at this topic:
https://forum.pdf-xchange.com/ ... php?t=8367
Which gives a possible solution.

Best,
Stefan
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hello Stefan,

thank you for your quick reply. I see the point in closing and reponening the document,

--------
My approach form within vim to date on windows xp command line is similar:

Code: Select all

:w !pdfxcview /close:discard %<.pdf && pdflatex %<.tex && pdfxcview %<.pdf
(translates: write current file, close:discard current .pdf file, pdflatex current file, open new .pdf file.)
--------

but I'm unsatisfied with this solution, since the dissapearance of the file from screen hinders me of inspecting it for the time of compilation.

In a convenient refresh there is less inconsistency for checking differences in old and new file. This is why a nonlock for pdf files would be great or if that is not possible, maybe if there was an exact-copy function at hand, one could write a macro to exact-copy-open a file (with current page and zoom level) while closing the real document, opening the new document, closing and deleting the copied one, so there would be time to just "gaze" at the screen and see the difference after compilation immediately.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hello Panny,

Actually as Vasyl posted here:
https://forum.pdf-xchange.com/ ... =35&t=9921
There is a way to open a file in non locked mode in our Viewer even now.
But I am not sure whether when you make changes to the file it will be refreshed in the Viewer.

Best,
Stefan
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hi Stefan,

I'm sorry to report this actually seems to work fine at start - pdfxcviewer asks to reload the document since it was changed - but then unfortunately crashes. I guess what Ivan postet here may not have been tested well:

https://forum.pdf-xchange.com/ ... pen#p36247

This would be great if works, since pdflatex did not complain and I was sooo close ;)

Thanks a lot.
panny
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hello Panny,

Just to be sure can you check in Help -> About that you are using the latest build of our Viewer (currently 2.5.195) and then I will see if I can try to reproduce your problem.

Best,
Stefan
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hi Stefan,

great! yes, sure. It says

Version: 2.5 (Build 195.0)
(Apr 12 2011; 18:54:40)

If you need any support from my side I'm eager to help. Testing patched versions... :D

panny.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hello Panny,

Apologies for this but it seems like I can't find a windows version of LaTeX to download and test.
Could you please send me a link so that I can get started with the testing.

Best,
Stefan
User avatar
BigMike
User
Posts: 307
Joined: Wed Nov 07, 2007 10:07 am

Re: command line option to copy a pdf exactly

Post by BigMike »

I'm using the MikTeX package.

Wow, somehow I missed that - thank you for finally implementing a non-blocking mode :)

I got one crash, but I'm not able to reproduce it. It's just working fine now.

But, it's a pity, that the viewer doesn't remember the page/viewing settings. It always jumps to page one upon refresh of the document.

It would be nice if it would behave a bit different:
- If the document is opened on page n and after refreshing the document has still at least n pages, display page n again
- If the document is opened on page n and after refreshing the document less than n pages, display the last page

Kind regards,
Michael
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Tracker Supp-Stefan wrote:Hello Panny,

Apologies for this but it seems like I can't find a windows version of LaTeX to download and test.
Could you please send me a link so that I can get started with the testing.

Best,
Stefan
Hello Stefan,

sorry for the late reply. You can download TeX Live 2010 http://www.tug.org/texlive/acquire-netinstall.html. I knew this would be some sort of pain since TeX Live is a big package :( but it kind of installs automatically, so I guess after downloading itself it will configure itself and everything is good. But yes, I was aware this would be some effort. Sorry for that.

@Michael
I tested it a few times and it alwas crashed for me.
User avatar
BigMike
User
Posts: 307
Joined: Wed Nov 07, 2007 10:07 am

Re: command line option to copy a pdf exactly

Post by BigMike »

Hi panny,

actually I saw my build string is

Code: Select all

Version: 2.5 (Build 195.0)
(Apr 12 2011; 18:58:00)
I'm using the 64bit version of the viewer. Maybe you're using the 32bit version?

Do you change something in the document or are you simply recreating the same one? Can you provide a short sample document, which doesn't work for you?
Maybe it's dependent on special features in the pdf.
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hi Michael,

BigMike wrote: (Apr 12 2011; 18:58:00)
yours was build 3min 20sec later than mine - do you think someone changed something in it ? ;)

I'm using the 32bit on windows xp sp3. I tried both, changing and not changing anything and then checking how pdfxcview reacts. It notices that the document was changed and asks me if it should reload and if it should remember my decision and when I click yes reload, yes remember, it crashes and wants to send an error message to microsoft.

I don't think it depens on feature of the pdf since they all are visible in the pdf after creation. There are tikz pictures in it but that is no problem - pdfxcview didn't have any kind of problem with them for just viewing.
Last edited by panny on Sat Jun 25, 2011 12:01 pm, edited 1 time in total.
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Here are some news.

After I answered Michael I realized, maybe I should not check the "remember my decision" option.

I opened the newly created (old one deleted, new created) document with

Code: Select all

pdfxcview /A "nolock=yes=OpenParameters" doc.pdf
and it opens at the place I left (page number, zoom factor). Then, while document still open I run again (without any changes)

Code: Select all

pdflatex doc.tex
and got one reload without any problems (without remember my decision). Then, I run again

Code: Select all

pdflatex doc.tex
and did relaod again but a few seconds later, when scrolling it crashed.
User avatar
BigMike
User
Posts: 307
Joined: Wed Nov 07, 2007 10:07 am

Re: command line option to copy a pdf exactly

Post by BigMike »

Hi panny,
panny wrote: yours was build 3min 20sec later than mine - do you think someone changed something in it ? ;)
No, I don't think, that something was changed. The 64bit version was probably built afterwards.
panny wrote: I'm using the 32bit on windows xp sp3. I tried both, changing and not changing anything and then checking how pdfxcview reacts. It notices that the document was changed and asks me if it should reload and if it should remember my decision and when I click yes reload, yes remember it crashes and wants to send an error message to microsoft.
Ok, I'm using the 64bit version on Windows 7, so the architecture is completely different.
panny wrote:After I answered Michael I realized, maybe I should not check the "remember my decision" option.
I tried with this option checked and unchecked. This works here. Seems to be a problem with the 32bit version
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

I would be really interested in what the cause is :(
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: command line option to copy a pdf exactly

Post by Vasyl-Tracker Dev Team »

Hi, Michael.
..that the viewer doesn't remember the page/viewing settings. It always jumps to page one upon refresh of the document.
It would be nice if it would behave a bit different:
- If the document is opened on page n and after refreshing the document has still at least n pages, display page n again
- If the document is opened on page n and after refreshing the document less than n pages, display the last page
We will add this feature in the new build (upcoming). Thanks for your suggestions.

Best
Regards.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
User avatar
BigMike
User
Posts: 307
Joined: Wed Nov 07, 2007 10:07 am

Re: command line option to copy a pdf exactly

Post by BigMike »

Very nice, thank you!

Any news about the crashes of the 32bit version, reported by panny?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hi Mike,

Mondays are usually crazy - and we are also going through a lot of tickets in preparation for the new build so I didn't have the chance to test - but will see to do it tomorrow and advise whether I get the same crashes (32bit XP SP3 here).

Thanks,
Stefan
User avatar
BigMike
User
Posts: 307
Joined: Wed Nov 07, 2007 10:07 am

Re: command line option to copy a pdf exactly

Post by BigMike »

Thank you Stefan :)
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Any news? Can I help somewhere? :)
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hello panny,

I just managed to install the MiKTeX that Mike sent me a link to, and am still getting acquainted with the environment.
I hope I will manage to set everything up tonight, and see if I can reproduce the crash.

Best,
Stefan
User avatar
BigMike
User
Posts: 307
Joined: Wed Nov 07, 2007 10:07 am

Re: command line option to copy a pdf exactly

Post by BigMike »

Hi Stefan,

sorry, maybe a quick introduction would have been a good idea. The LaTeX package brings only the compilers and different packages for formatting the text, special characters, drawing...
LaTeX documents are plain text files. You can edit them with any text editor. Maybe you simply want to use some samples.

To directly create a pdf from your source file, put the "bin" subdirectory from your MikTeX installation, which contains various executables, into your path. In the document's directory simply type "pdflatex filename.tex".

I think, MikTeX tries to download missing packages automatically by default. If you have any problems, feel free to ask.

Kind regards
Michel
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Thanks for the pointers to the samples Mike!

Much appreciated. That did help a lot!

So what I did is this:
1) I installed MiKTEX on my machine.
2) Downloaded one sample file.
3) Opened it in TeXworks that came with the MiKTEX installation to check the syntax of a sample tex file.
4) I was using TeXworks to make changes to this sample and save them - there was a typeset button in there - that was doing the conversion to PDF for me - but I didn't use that as it was launching some build in PDF Viewer.

5) Opened the command line, changed my working directory to where my .tex file was and ran this code

Code: Select all

pdflatex sample.tex
from the command line.

6) After that I launched the viewer from the command line as well (I didn't include the Viewer.exe location in my paths - so was calling it directly)

Code: Select all

"C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe" /A "nolock=yes=OpenParameters" sample.pdf
7) repeat steps 4-6 several times.

Each time the viewer was asking me for a reload of the file, and never crashed for me.

So apologies panny but the problem is most probably related to your specific file and the changes you are performing, as I am using pretty identical to your system - XP SP3 32 bit, and despite my lack of skill in working with LaTeX and the repeated changes to the same .tex file I never got a crash.

Best,
Stefan
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hello Stefan,

--sample testing -- (sorry)
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hi Panny,

I am not sure I understand your comment
--sample testing -- (sorry)
fully - so is it that you are testing with the same sample file, that you want me to test with another file, or you modified your post and deleted something from it?

I am willing to try with your file so please either zip and attach it here or if it's confidential - send it to support@tracker-software directly with a link to this topic, and I will test it for you.

Last night I also did some more testing - using Notepad to make changes to the sample file, and selecting "do not ask me for this file again" in the Viewer and selecting to reload it - so the Viewer was autoreloading the file after I made changed and regenerated it - and was still unable to see a crash.

Best,
Stefan
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hello Stefan,

thanks for your kind reply.
Tracker Supp-Stefan wrote:Hi Panny,

I am not sure I understand your comment
--sample testing -- (sorry)
fully - so is it that you are testing with the same sample file, that you want me to test with another file, or you modified your post and deleted something from it?
I needed to modify my post because I missed the sample :roll: All following test I did with the sample.
Tracker Supp-Stefan wrote: I am willing to try with your file so please either zip and attach it here or if it's confidential - send it to support@tracker-software directly with a link to this topic, and I will test it for you.
Frankly, I doubt it is something specific about the file itself. I tried various samples, also some other small .tex files.

Tracker Supp-Stefan wrote: Last night I also did some more testing - using Notepad to make changes to the sample file, and selecting "do not ask me for this file again" in the Viewer and selecting to reload it - so the Viewer was autoreloading the file after I made changed and regenerated it - and was still unable to see a crash.

Best,
Stefan
Could you please post ?

Code: Select all

pdflatex -version 

pdfTeX 3.1415926-1.40.11-2.2 (Web2C 2010)
kpathsea version 6.0.0
Copyright 2010 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.4.3; using libpng 1.4.3
Compiled with zlib 1.2.5; using zlib 1.2.5
Compiled with xpdf version 3.02pl4



These are the steps I took at the minimal to reproduce my crash:
  • Open TeXworks editor.
  • Copy tex code from http://en.wikibooks.org/wiki/LaTeX/simple.tex to TeXworks editor.
  • Save file as crashtest.tex in new folder crashtest.
  • Close TeXworks editor (Strg+Q).
  • Run cmd.exe.
  • Go to folder crashtest.

    Code: Select all

               30.06.2011  12:58             6.684 crashtest.tex
  • Run pdflatex crashtest.tex.

    Code: Select all

               30.06.2011  12:58               541 crashtest.aux
               30.06.2011  12:58             6.252 crashtest.log
               30.06.2011  12:58            69.780 crashtest.pdf
               30.06.2011  12:58             6.684 crashtest.tex
  • Run pdfxcview /A "nolock=yes=OpenParameters" crashtest.pdf (-->PDF-XChange Viewer opens).
  • Alt+Tab back to cmd.exe.
  • Run pdflatex crashtest.tex.

    Code: Select all

               30.06.2011  13:01               541 crashtest.aux
               30.06.2011  13:01             6.040 crashtest.log
               30.06.2011  13:01            68.771 crashtest.pdf
               30.06.2011  12:58             6.684 crashtest.tex
  • Alt+Tab to PDF-XChange Viewer.
  • Hit Enter for reload.
  • File reloads.
  • Alt+Tab back to cmd.exe
  • Run pdflatex crashtest.tex.

    Code: Select all

               30.06.2011  13:03               541 crashtest.aux
               30.06.2011  13:03             6.040 crashtest.log
               30.06.2011  13:03            68.771 crashtest.pdf
               30.06.2011  12:58             6.684 crashtest.tex
  • Alt+Tab to PDF-XChange Viewer.
  • Hit Enter for reload.
  • File reloads.
    PDF-XChange Viewer has encountered a problem and needs to close.
    Image
As seen above, on the second run of pdflatex, the file size changes although nothing else was changed in the file (it was closed). So I'm not entirely sure if it is a pdflatex issue... :?:

Here is another thing I tried. Since the file size does not change after the second run, I opened the pdf only after the second run so no changes were made ever (at least to tell from the file size) and did the same procedure: pdflatex, alt+tab+reload, pdflatex, alt+tab+reload and got the same error after the second reload. I have no clue what the problem here is :| I have no other programs complaining. Maybe it would be nice to know which version of pdfxcviewer you have used and your pdflatex version.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hello panny,

I ran the tests again with the same sample file. The first time the PDF Generated was 74546 bytes, and then on consecutive recompiles - (without modifying the source file) the new PDF was 73531 bytes - so I noticed this slight change as well - but I am still unable to crash the Viewer - and it diligently prompts me to reload the file every time.

I tried clicking the OK button with the mouse or selecting it with the arrows, and also directly only pressing the enter key - each several times - and still no crashes on my end.

The version I use here is :
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2011.6.29)
And you use 1.40.11

Best,
Stefan

P.S. Also attached the result after my last test - including the log file for the conversion.
Attachments
crashtest.rar
(70.93 KiB) Downloaded 642 times
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: command line option to copy a pdf exactly

Post by Vasyl-Tracker Dev Team »

Hi, panny.

We still cannot reproduce your problem...
Can you send us the standard bug-report from our PDF-X Viewer (Menu/Help/Report a Problem) with enabled(!) option "Include list of loaded modules (DLL)..."?
Thanks.

Best
Regards
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hi Stefan, Hi, Vasyl.

I noticed a major version difference:

3.1415926-2.3-1.40.12 (MiKTeX) and 3.1415926-1.40.11-2.2 (TeX Live 2010) for pdfTeX. (2011 is not out yet). Probably that is the source of problem.

I filed a bug report to you guys but I doubt the viewer has any problems.

Thanks a lot for your help. I will try updating my TeX Live installation and see what happens. Will also report if that helped.
panny
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hello Panny,

Glad we could help so far and actually it seems like the versions are written differently, and the difference is not that major:
3.1415926-2.3-1.40.12 (MiKTeX)
vs
3.1415926-1.40.11-2.2 (TeX Live 2010)

But in any case please do update and let us know how it goes!

We do also have a new build of the Viewer - so make sure to update it as well :)

Best,
Stefan
User avatar
BigMike
User
Posts: 307
Joined: Wed Nov 07, 2007 10:07 am

Re: command line option to copy a pdf exactly

Post by BigMike »

Hi,

I've found a strange behavior:
If I'm switching to PDF XChange Viewer, while pdf compilation is still in progress, PDF-XChange Viewer will execute itself (at least my HIPS tells me) and open the pdf in exclusive mode. (That's a fact, recompiling again fails with the pdflatex message 'I can't write on file ...!')

Now my theory: If you're switching at the wrong time, PDF-XChange Viewer will try to aquire the lock while pdflatex is writing to the file and crash somehow.

panny, can you please try to let the compilation finish before switching to the viewer and tell us if the viewer still crashes?

Regards,
Michael

PS: I was able to reproduce this with build 195 and can still reproduce it with build 196
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hi there,

I finally updated my TeX installation to TeX Live 2011 and my PDF-XChange Viewer to Build 196.0, Version 2.5 (Jun 30 2011; 20:37:10)

Code: Select all

pdflatex -version

pdfTeX 3.1415926-2.3-1.40.12 (Web2C 2011)
kpathsea version 6.0.1
Copyright 2011 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.5.2; using libpng 1.5.2
Compiled with zlib 1.2.5; using zlib 1.2.5
Compiled with xpdf version 3.02pl5
I ran the procedure from my previous post, but had no luck :?

@Michael I noticed that behaviour, too. You are right, if you mess around with the document while compilation, it gets locked again. It might be one seperate issue or maybe the cause of the crash but then again, you would have a crash, too.

I observed myself for the compilation time I don't even hit the mouse. I always wait for compilation to finish.

EDIT:
My anti-virus program is not causing any trouble. I get the crash with and w/o it.

@Vasyl Did you get the bug report with the dll's and stuff? Was it of any help?

EDIT:
What I realized: the crash always happens on the second reload, no matter how often one compiled the file before. But maybe this is not really of any help.

EDIT:
Also, I set all options to default (I exported my preferences) and well..it took me more than two reloads to crash.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hello panny,

You are asking Vasyl if he got a bug report from you in your last post.
@Vasyl Did you get the bug report with the dll's and stuff? Was it of any help?
But we can not find it. Have you sent that e.g. directly to Vasyl via e-mail, as I could not find any dlls in the attachments to this topic, so we are a bit at a loss here.

Best,
Stefan
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hi Stefan,

no, Vasyl asked for a bug report from within PDF-XChange Viewer with "DLL options" checked, but I did not receive any feedback from the PDF-XChange Viewer itself if the message was sent.

I'm sorry for not being able to localize the source of my problem. I really try hard to pinpoint the cause but I have no idea how to go on from here. My windows xp installation isn't that old - a few weeks, so I discarded the possibility of my system being too mature and mixed up. Right now I'm downloading the automatic updates (which I never downlaoded) for windows itself, maybe this will fix something if anything was wrong.

All the best,
panny
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hello Panny,

Could I please ask you to send the same report once again - and in the body of the message please make sure to include a link to this forum topic. And I will see to pass all the files to Vasyl.

Also the updates to XP could also have their effect - especially if the fresh copy you installed a few weeks ago was not a SP3 one.

Best,
Stefan
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: command line option to copy a pdf exactly

Post by Vasyl-Tracker Dev Team »

Hi, guys.
BigMike wrote:If I'm switching to PDF XChange Viewer, while pdf compilation is still in progress, PDF-XChange Viewer will execute itself (at least my HIPS tells me) and open the pdf in exclusive mode. (That's a fact, recompiling again fails with the pdflatex message 'I can't write on file ...!')
When "NoLock" mode is enabled for document the current viewer's behavior is:
1. Viewer will try to make a temporary copy from the original file.
**If failed - then viewer will open the original file directly, in this case the original file will be locked for writing...
*** We can change the behavior in this case - the viewer could only display a warning-message like "Couldn't open in non-blocked mode..." without opening the original file..
**** The Viewer locks the original file during the creation of the temp. copy and unlocks it after copying - during this time the opening of the original file in an external application could fail. I'm not sure that this problem can be solved.

2. Viewer will try to open this temporary copy.

3. After opening the copy - viewer starts the background file changes monitor for the original file.

4. When original file is changed and application is active then our Viewer will notify the user about changes... If user press "reopen" then viewer will go to step #1.
- as you see - switching to our viewer and pressing the "reopen" during recompilation in latex may cause some problems.
panny wrote:I observed myself for the compilation time I don't even hit the mouse. I always wait for compilation to finish.
What I realized: the crash always happens on the second reload, no matter how often one compiled the file before. But maybe this is not really of any help.
Also, I set all options to default (I exported my preferences) and well..it took me more than two reloads to crash.
I thinking - you have another problem than BigMike. Please re-send the bug-report with enabled "Include your printers and SETTINGS info..." and "Include list of all loaded modules...". Thanks
Other moment: are you sure that you managed to completely shutdown your antivirus, as I known - it is not a trivial operation for many antiviruses. Most of them can shutdown completely only after turning off the engine and disabling option "Start <Antivir> with operation system" and restating the operation system... If you have used the "Exit/Quit" from context menu on the tray - I believe it leaves all avir services running and you have only stopped the UI control.

Best
Regards.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hi Stefan,

sure, I can file another report.

As for the fresh copy of XP, it was a bundle with +SP3, so that was no mistake, it is XP Prof SP3. I can tell for sure because it is displayed constantly on my desktop at the right corner. But I excluded automatic updates because they get in the way, restart without me knowing and above all I didn't want IE7 on my computer but well, I guess it doesn't hurt.
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hi Vasyl!
Vasyl-Tracker Dev Team wrote: I thinking - you have another problem than BigMike. Please re-send the bug-report with enabled "Include your printers and SETTINGS info..." and "Include list of all loaded modules...". Thanks
I sent the bug report with a link to this forum. But again, I did not receive any feedback from the program so I can't tell if its really out there. You have to give me feedback on this :) Did you get any bug report now?

As for the antivirus program, I use Sophos Antivirus and I disabled all related services by means of control-panel->Administrative Tools->services->stop service. So I disabled all windows services related to sophos. Sophos does not have a quit or exit function afaik.

panny
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: command line option to copy a pdf exactly

Post by Vasyl-Tracker Dev Team »

Hi, Panny.
As for the fresh copy of XP, it was a bundle with +SP3, so that was no mistake, it is XP Prof SP3.
I think - the possible reason of your problem on the previous OS - other product (I don't known which) probably injected the DLL into our process at the moment of start, and this injected DLL can cause a crash in our process, It is not a rare situation for XP - this OS allows full access from one program to another by injecting special program components, otherwise in the Vista\Win7 the injecting is restricted.

Best
regards.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: command line option to copy a pdf exactly

Post by Vasyl-Tracker Dev Team »

Hi, Panny.
I sent the bug report with a link to this forum. But again, I did not receive any feedback from the program so I can't tell if its really out there. You have to give me feedback on this :) Did you get any bug report now?
After pressing "Next..." button in the "Report Bug dialog" the our viewer should start the your mail-client window with new letter with some attachments and with "pdfxview@tracker-software.com" address in the "TO:" box.
Have you seen it? If not - what email client you have used?

Thanks.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Vasyl-Tracker Dev Team wrote:Hi, Panny.
I sent the bug report with a link to this forum. But again, I did not receive any feedback from the program so I can't tell if its really out there. You have to give me feedback on this :) Did you get any bug report now?
After pressing "Next..." button in the "Report Bug dialog" the our viewer should start the your mail-client window with new letter with some attachments and with "pdfxview@tracker-software.com" address in the "TO:" box.
Have you seen it? If not - what email client you have used?

Thanks.
Hello Vasyl!

I don't use any email client. So that is the reason why no mail was sent. Can I pick the necessary files manually and zip them for you? Can you give me a list of files you need?

Regards.
panny
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

status

Post by panny »

I want to update my status. I have installed all updates for windows and tested again but unfortunately no success. So, to sum up, my windows xp sp3 is up-to-date, pdflatex is 2.3, pdfxchange viewer is Build 196.0

panny
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hi Vasyl!
Vasyl-Tracker Dev Team wrote: When "NoLock" mode is enabled for document the current viewer's behavior is:
1. Viewer will try to make a temporary copy from the original file.
**If failed - then viewer will open the original file directly, in this case the original file will be locked for writing...
*** We can change the behavior in this case - the viewer could only display a warning-message like "Couldn't open in non-blocked mode..." without opening the original file..

I think this might turn into a problem in case the file is just being written and not locked (as in case of pdflatex, I guess) but this is out of responsibility of the pdf viewer - the pdf viewer cannot know if the external program is finished messing around with the document, unless it is locked.

**** The Viewer locks the original file during the creation of the temp. copy and unlocks it after copying - during this time the opening of the original file in an external application could fail. I'm not sure that this problem can be solved.

I my opinion, that is fine.

2. Viewer will try to open this temporary copy.

3. After opening the copy - viewer starts the background file changes monitor for the original file.

4. When original file is changed and application is active then our Viewer will notify the user about changes... If user press "reopen" then viewer will go to step #1.
- as you see - switching to our viewer and pressing the "reopen" during recompilation in latex may cause some problems.

My suggestion here is, make the reload dialog non-modal. So the user can decide on his own when to reload his document and is responsible for its sanity. This is a legitime solution, since again, pdfxcviewer cannot know if and when the document is ready, unless it was locked by e.g., pdflatex. If the user decides to reload the document but the document is corrupt, he is responsible for the crash. But on the other hand, if the user was forced to reload the document because the dialog box was modal, then pdfxcview is responsible for the crash, since it left no other choice.

I think there is no solution to knowing if an external program is still writing to a file. So it is the responsibility of the user to ensure the external program is finished and pdfxcviewer does not load a corrupt document. But if the dialog box is modal, the user is forced to reload the document as soon as the viewer is active so he has no choice but not touching the viewer at all. But he will not know that and be angry about the crash. That is not convenient for the user, since he wants to be notified that there is new things happening in the background but still wants to surf the document for pages to view them and then, when he finally decides to reload, it should be just one click.

So I think the problem is, pdflatex does not lock the document while writing it, so pdfxcview cannot know when it is finished. But there is nothing pdf xchange view can do about this but offer a convenient way to cope with it.

I guess that would be a solution that would satisfy me if that was my problem. But unfortunately, I get my viewer crashed although I don't reload corrupt but sane documents.

Hoping for the Best.
panny
User avatar
BigMike
User
Posts: 307
Joined: Wed Nov 07, 2007 10:07 am

Re: command line option to copy a pdf exactly

Post by BigMike »

Vasyl-Tracker Dev Team wrote:When "NoLock" mode is enabled for document the current viewer's behavior is:
1. Viewer will try to make a temporary copy from the original file.
**If failed - then viewer will open the original file directly, in this case the original file will be locked for writing...
*** We can change the behavior in this case - the viewer could only display a warning-message like "Couldn't open in non-blocked mode..." without opening the original file..
**** The Viewer locks the original file during the creation of the temp. copy and unlocks it after copying - during this time the opening of the original file in an external application could fail. I'm not sure that this problem can be solved.

2. Viewer will try to open this temporary copy.

3. After opening the copy - viewer starts the background file changes monitor for the original file.

4. When original file is changed and application is active then our Viewer will notify the user about changes... If user press "reopen" then viewer will go to step #1.
- as you see - switching to our viewer and pressing the "reopen" during recompilation in latex may cause some problems.
Ok, I see, this is probably not the problem for the crashes. Sorry - I ran out of ideas.

Maybe a warning would be a good idea in the above situation **. Best would be something like "Failed to open file in non-blocking mode, what would you like to do?" "Try again" (back to 1), "Try to open exclusively" (continue with **), "Cancel" (do nothing as you proposed).

At least this doesn't cause an unintended permanent lock of the file without user interaction. I'd also like to have some hint, in case a document is opened in "non-blocking" mode. Maybe something like the warning symbol for "PDF/A" documents. But I think, that the warning symbol isn't well chosen for both cases.
The first time I opened a PDF/A document, I thought the file contains errors (I saw this warning symbol in those cases before - but you have to click on it to get more information). Maybe a "PDF/A" and a "Read only mode" symbol could be used here.

Thank you
Michael
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: command line option to copy a pdf exactly

Post by Vasyl-Tracker Dev Team »

Hi, all
panny wrote:My suggestion here is, make the reload dialog non-modal.
Thanks for your suggestion - we will add this feature into the new version V3.
BigMike wrote:Maybe a warning would be a good idea in the above situation **. Best would be something like "Failed to open file in non-blocking mode, what would you like to do?" "Try again" (back to 1), "Try to open exclusively" (continue with **), "Cancel" (do nothing as you proposed).
OK. We will add this warning dialog (modal) into the next build.
BigMike wrote:Maybe something like the warning symbol for "PDF/A" documents. But I think, that the warning symbol isn't well chosen for both cases.
The first time I opened a PDF/A document, I thought the file contains errors (I saw this warning symbol in those cases before - but you have to click on it to get more information). Maybe a "PDF/A" and a "Read only mode" symbol could be used here.
Good ideas. We will add special text label for the non-blocked document title like to "[Non-Blocked]" and will some change PDF/A warning icon. Thanks. Wait for the next build.

Best
Regards.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: command line option to copy a pdf exactly

Post by Tracker Supp-Stefan »

Hi BigMike and panny,

And thank you for the great suggestions.
In order to keep track of them all and make sure that they are all implemented I created a ticket for our devs:
#1129: New Features for topic: command line option to copy a pdf exactly
So that these could be assigned and worked on as soon as possible.

We will update this topic with any news as they become available.

Best,
Stefan
User avatar
BigMike
User
Posts: 307
Joined: Wed Nov 07, 2007 10:07 am

Re: command line option to copy a pdf exactly

Post by BigMike »

Thanks for keeping us updated and implementing our proposals. It's a pleasure to be a guest in your forums!
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6897
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: command line option to copy a pdf exactly

Post by Paul - Tracker Supp »

:)
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

Re: command line option to copy a pdf exactly

Post by panny »

Hello Vasyl,
Vasyl-Tracker Dev Team wrote:Hi, Panny.

I think - the possible reason of your problem on the previous OS - other product (I don't known which) probably injected the DLL into our process at the moment of start, and this injected DLL can cause a crash in our process, It is not a rare situation for XP - this OS allows full access from one program to another by injecting special program components, otherwise in the Vista\Win7 the injecting is restricted.

Best
regards.
can you clarify, please? Which program do you think injects a DLL into your program and how can I avoid it?

Thanks a lot.
panny
panny
User
Posts: 28
Joined: Fri Jun 24, 2011 11:17 am

2.5.197.0

Post by panny »

Hi everyone,

I noticed an upgrade to 197.0 and I think it is great! I can see the [Non-Blocked] label :)

cheers,
panny

P.S.: I'm still investigating my crash reason. I installed an email client Thunderbird but still the error report email does not open :/ which email clients do you support?
Post Reply