Results 1 to 11 of 11
  1. #1
    ekryez is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    25

    Access to PDF Mixed Characters acFormatPDF

    Problem is that the output Pdf Report files have special characters displayed. When i Print to Pdf all is Fine. See attached.

    MyProjectNumber = !ProjectNumber
    MyProjectName = !ProjectName


    MyFileName = MyProjectNumber & " " & MyProjectName & ".PDF"
    DoCmd.OpenReport "Pipeline Total Report", acViewPreview, , "ProjectNumber='" & !ProjectNumber & "'"
    DoCmd.OutputTo acOutputReport, "Pipeline Total Report", acFormatPDF, MyPath & MyFileName
    DoCmd.Close acReport, "Pipeline Total Report"


    Click image for larger version. 

Name:	PictureReport.jpg 
Views:	9 
Size:	282.5 KB 
ID:	19902

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Apparently there are some non-visible characters that the VBA OutputTo method cannot interpret, although your PDF printer driver can.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ekryez is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    25
    Quote Originally Posted by June7 View Post
    Apparently there are some non-visible characters that the VBA OutputTo method cannot interpret, although your PDF printer driver can.
    Hi June is there any workaround?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I don't know what is causing that character nor why it overprints other characters. Where does this text come from? Is it typed input or imported?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ekryez is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    25
    Quote Originally Posted by June7 View Post
    I don't know what is causing that character nor why it overprints other characters. Where does this text come from? Is it typed input or imported?
    Is imported from Excel.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Then there is something in the text in the Excel file. If you want to provide for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    ekryez is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    25
    Quote Originally Posted by June7 View Post
    Then there is something in the text in the Excel file. If you want to provide for analysis, follow instructions at bottom of my post.
    Its bigger then 2MB so Drop Box

    https://www.dropbox.com/s/o3mnv26l35...eline.zip?dl=0

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Can't download the file, my home internet is too slow for that size file and blocked at work. Was that just the Excel file?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    ekryez is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    25
    Quote Originally Posted by June7 View Post
    Can't download the file, my home internet is too slow for that size file and blocked at work. Was that just the Excel file?
    i inserted the access db as well, below only excel.Internal.zip

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I imported the spreadsheet but the Summary and Challenges data truncated. However, I do get the issue with exporting report to PDF.

    I deleted all the forced line returns in the Excel file and the odd symbols no longer show in the PDF.

    Then I typed forced line returns in the Access data. Those do not export as odd characters.

    Apparently forced line feed in Excel is incomplete and the PDF export doesn't translate it properly.

    Run an UPDATE sql to replace the bad Lf character with CrLf.

    UPDATE Master SET ProjectChallenges = Replace([ProjectChallenges], Chr(10), Chr(13) & Chr(10))


    BTW, misspelled word in the summary for Saferay: for should be four
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    ekryez is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    25
    Hi June, thanks again for the solution.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 11-11-2013, 01:42 PM
  2. Expression with mixed value result
    By chelseasikoebs in forum Access
    Replies: 2
    Last Post: 10-23-2013, 09:18 AM
  3. Replies: 9
    Last Post: 02-11-2013, 03:09 PM
  4. Replies: 5
    Last Post: 12-15-2011, 11:16 AM
  5. Data mixed up
    By neo651 in forum Access
    Replies: 3
    Last Post: 09-28-2011, 04:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums