Beiträge von beleg

    Hi,

    I have a problem viewing some PDFs when using UNC paths. My problem is this:

    I have an application using WPViewPDFPlus3 running on a server. I use this application (among other things) to view and manage PDFs. When trying to view certain PDFs, the viewer shows only blank pages. This seems to happen only when my application is run from a UNC-path, when I copy the application to my local harddrive in runs great, and when i map the directory on the server to a drive letter it runs great. I've also tried going back in time, and when using WPViewPDF3Plus.dll 3.24.4.872 (2015-01-05) or 3.12.6.649 (2014-04-28) it doesn't work, but with 3.9.8.417 (2013-05-17) it works.

    Hope you can help me :)

    I'm on Win 7 Pro x64, if that matters.

    Hi,

    I use wpview_pdfMerge to convert TIFF-files to PDFs. This works excellently, until I try it with a filepath with Norwegian characters like æ, ø, å, Æ, Ø, Å. From the logfile it seems the function simply drops Norwegian characters, so that c:\stjørdal\*.tiff becomes c:\stjrdal\*.tiff, which of course can't be found.

    I use wpViewPDFPlus3, seems this works as it should in wpViewPDFPlus2.

    Is there a way to make rotated pdf files stay rotated when I export them to jpeg or metafile? I'm using WPViewPDF3Plus.

    More details:

    I tried rotating a pdf in acrobat pro, opened it in my application using wpviewpdf3plus, which rendered the file beautifully, ran a compdf_getpagerotation and got the expected 90 degrees, but when I ran getmetafileprn, or used pdfmakejpeg, the pdf was exported without the rotation.

    In my application I want users to imported scanned pdf files, and then have them available as part of a print job. I use my own canvas with a lot of extra stuff on there, so I need a metafile or jpeg to make this work.

    The thing is that users not always know or care about which way they put documents in their scanner, and so rotate the scans after having opened them in my application using wpviewpdf3plus, and expect them to still be rotated when they get to printing.

    Appreciate any help :)

    Hi, I just upgraded to WPViewPDFPlus3, and ran into a problem. I'm using pdfMakeJPEG() to convert a pdf to a series of jpeg-pages, which are then to be imported into a TJPEGImage. This worked beautifully with WPViewPDFPlus2, but in 3 I get an exception with the error mesage "JPEG error #53", which from what I can gather has to do with a misformatted jpeg. I also tried opening the jpeg from pdfMakeJPEG() in Adobe Photoshop CS5 and got the error message "Could not complete your request because an unknown or invalid JPEG marker type is found." Windows 7 reads the file perfectly though, and so does ACDSee Pro 3. This seems to happen no matter which pdf-file I use as input.

    There is also a matter with pdfMerge. With WPViewPDFPlus2 I've been using pdfMerge to convert TIFF-files into pdf's. When I try the same with WPViewPDFPlus 3, I get the error "Can't open output file for writing". This happens even if my output-file doesn't exist, and no matter which path or filename length I try. The resulting pdf-file is being created by the process, but without any content.

    I also note that checkboxes and such are now converted correctly when making a jpeg, which they didn't in 2. Thanks :)

    Hope you can address these concerns promptly, as I have clients waiting for updates :)

    Hi,

    We do use wPDF, yes, and we already include wpEmbedTrueTypeFonts. But if this was a problem with wPDF, then why would my metafile be affected? Are we perhaps using global variables so PaintRTFPage is affected?

    Bjorn

    Hi,

    I'm trying to print a rich text, but run into problems when I include bullet points. The troubling thing is that it's not constant. What happens is, I have a TWPRichText-object, and use its Memo->PaintRTFPage()-method to print the text to a canvas, which I then output to either a print preview, a printer, or a pdf-file depending on user input. When continuing to preview or to printer, everything seems fine, but when I try to export to pdf my bullet points disappear. At first glance this didn't seem like problem with the component, so I did some additional testing with a separate canvas which I exported to a metafile, just to have a glance at what's going on. And lo and behold, this metafile has the same problem, even though it's completely independent of any devices. To confuse the matter even more, I at the same time export the rich text as an rtf-file, which looks great in all cases.

    Ok, this got confusing. Maybe a bit of code can clarify:

    Here, prwp->wp is my original TWPRichText-object, and PPC is the canvas that eventually goes to print.

    So, when the user wants to preview or print, PPC, temp.emf and temp3.rtf all looks good, with bullet points
    When the user wants to export to pdf, temp3.rtf looks good, but PPC and temp.emf both loose the bullet points.

    I can't understand why this would happen for both the result coming from PPC and temp.emf if the PaintRTFPage()-method is good. And I can't understand how this method would be affected by how the user wants the result to be produced...

    This all seems very weird to me, hope you have some insight for me :) I use CodeGear C++ Builder 2007 and wptools 6

    Hi,

    I've now also tried using wpview_pdfMakeJPEG() on the pdf-file, with the same results as when converting to metafile. Checked checkboxes appear as R in my resulting jpeg, while unchecked checkboxes appear as £.

    Can I maybe send an example somewhere so you can check it out for me?

    Bjørn

    Hi,

    I'm converting pdf-files to metafiles, but get a problem when my pdf-files contain stuff like checkboxes. Checked checkboxes appear as R in my resulting metafile, while unchecked checkboxes appear as £. I've tried both GetMetafile() and GetMetafilePrn().

    Other than that, I love your product :)

    I'm using wPDFViewPlus02.dll v2.59.5.0

    Bjørn Engelberg

    I'm trying to rotate a page in a pdf, which seems to be working fine.
    I'm then saving this page to a temporary file, which seems to be working fine.
    I'm then using wpview_pdfMakeJPEG() to convert this temporary pdf-file into jpeg (which is required by our system). This step however seems to have a problem. The rotation is gone, and the resulting jpeg is a conversion of the original pdf, not the rotated temporary one.
    Could it be that the rotation is stored as metadata, and that wpview_pdfMakeJPEG() doesn't take this into account?

    My bad... just had a brainwave and checked to see if the version I though I was running was the version I was really running... which it wasn't :(

    Everything seems to be working now... thanks :)

    Downloaded and installed new version, problem remains.

    CommandStrEx(COMPDF_RotatePage, "all", 90) crashes with "Project ### raised exception class EConvertError with message ''all' ist kein gültiger Integerwert'."
    CommandStrEx(COMPDF_RotatePage, "selected", 90) crashes with "Project ### raised exception class EConvertError with message ''selected' ist kein gültiger Integerwert'."
    CommandStrEx(COMPDF_RotatePage, "3", 90) works.
    CommandStrEx(COMPDF_RotatePage, "3-5", 90) works.

    I can make a work-around for this, if I can get info on the selection, but:

    CommandEx(COMPDF_PageSelectionGet, -1) returns -1.
    CommandEx(COMPDF_PageSelectionGet, 0) returns -1.
    CommandEx(COMPDF_PageSelectionGet, 1) returns -1.
    It doesn't seem to matter if I select none, one or several pages.

    I'm doing this in C++ on CodeGear C++ Builder 2007, if that matters at all.

    The code I'm trying is:

    I also get some problems when trying to rotate pages with CommandStrEx(COMPDF_RotatePage, "all", Angle). Stringparameter "all" crashes with the message ''all' ist kein gültigner Integerwert', which I guess means something like 'all is not a valid number', even though the documentation says I can use "all" and "selected" as parameters here. When trying a number here, e.g. "3" the command returns -1, but does rotate the page. A parameter like "3-4" which I would expect to rotate pages 3 and 4 does nothing.

    With all these commands returning -1 I'm starting to suspect that I need to enable commands in some way, or that something else is fundamentally wrong. I have tried setting ViewOptions with
    pPDFViewer->ViewOptions = pPDFViewer->ViewOptions << wpSelectClickedPage << wpShowPageMultiSelection << wpDisableBookmarkView;

    A short bit of example code would be much appreciated :)

    Good tip, I'll do that :)
    But the real problem is that CommandEx(COMPDF_PageSelectionGet, -1) returns -1, while I expected it to return the number of selected pages, and that CommandEx(COMPDF_PageSelectionGet, i) returns -1, while I expected it to return 0 for unselected and 1 for selected pages. I guess -1 indicates that something has gone horribly wrong, but what? Is there something like a GetLastError() or something?

    I'm trying to delete the selected pages in a pdf, but can't seem to figure it out...
    The idea here is that the user has selected one or more pages in a pdf (loaded in pPDFViewer). I then save the selected pages to a tempfile for future use. This works fine. The rest of the pages should then be available for the user to make another selection, but without the pages previously selected. I therefore try to delete the pages from the original document, but the COMPDF_PageSelectionGet-command returns -1 no matter what I do, and consequently the page aren't deleted. Did I miss anything?

    Code
    int Res = 0;
    Res = pPDFViewer->Plus->SaveSelectionToFile(TempFileName);                       // Res = 65536
    int SelectedCount = pPDFViewer->CommandEx(COMPDF_PageSelectionGet, -1);          // SelectedCount = -1
    for (int i = 0, j = 0; i < pPDFViewer->PageCount && j < SelectedCount; i++) {    // pPDFViewer->PageCount = 55 for my testdocument
      if ((Res = pPDFViewer->CommandEx(COMPDF_PageSelectionGet, i)) == 1) {          // Res = -1, both for selected and unselected pages
        Res = pPDFViewer->DeletePage(i);
        j++;
      }
    }
    Res = pPDFViewer->Command(COMPDF_PageSelectionClear);

    I guess I could invert the selection, save the selection as a new tempfile and load this as my new original... but I don't want to :)